postgres.git / summary / log / commit / refs
commit 9a284cc75671aa0fdaea8f4e31ec8c1847685e59
Author: Fujii Masao <fujii@postgresql.org>
Date: Thu Oct 22 01:49:40 2026 +0000
First released in: 14.25, 15.20, 16.16, 17.12, 18.7, 19.0
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
src/bin/psql/tab-complete.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 2749841323f..83a7eef60e4 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3185,7 +3185,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"))
[parent: e16d102a4849]