mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
psql: Fix tab completion for DROP INDEX CONCURRENTLY
psql offered CASCADE after DROP INDEX CONCURRENTLY and an index name, even though CASCADE is not supported with CONCURRENTLY. Offer only RESTRICT in this case, while retaining both CASCADE and RESTRICT for ordinary DROP INDEX. Backpatch to all supported versions. Author: Sho Ito <i.sho.0628@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: Shihao Zhong <zhong950419@gmail.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/CAG7L5+7KXgvJUGCGXzyQrt7UysC9iytaYzx-7YyQTFYXjHVTWQ@mail.gmail.com Backpatch-through: 14
This commit is contained in:
@@ -3545,7 +3545,7 @@ psql_completion(const char *text, int start, int end)
|
||||
else if (Matches("DROP", "INDEX", MatchAny))
|
||||
COMPLETE_WITH("CASCADE", "RESTRICT");
|
||||
else if (Matches("DROP", "INDEX", "CONCURRENTLY", MatchAny))
|
||||
COMPLETE_WITH("CASCADE", "RESTRICT");
|
||||
COMPLETE_WITH("RESTRICT");
|
||||
|
||||
/* DROP MATERIALIZED VIEW */
|
||||
else if (Matches("DROP", "MATERIALIZED"))
|
||||
|
||||
Reference in New Issue
Block a user