postgres.git / summary / log / commit / refs
commit bc56d5898d1cbd9dee6fe16ea7a814a5820b6181
Author: Peter Eisentraut <peter_e@gmx.net>
Date: Sun Jan 10 16:43:27 2016 +0000
First released in: 9.6.0
psql: Fix CREATE INDEX tab completion
The previous code supported a syntax like CREATE INDEX name
CONCURRENTLY, which never existed. Mistake introduced in commit
37ec19a15ce452ee94f32ebc3d6a9a45868e82fd. Remove the addition of
CONCURRENTLY at that point.
src/bin/psql/tab-complete.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index dcbe515fccb..52336aa96d1 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -2009,13 +2009,12 @@ psql_completion(const char *text, int start, int end)
else if (TailMatches3("INDEX", MatchAny, "ON") ||
TailMatches2("INDEX|CONCURRENTLY", "ON"))
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tm, NULL);
- /* If we have CREATE|UNIQUE INDEX <sth> CONCURRENTLY, then add "ON" */
- else if (TailMatches3("INDEX", MatchAny, "CONCURRENTLY") ||
- TailMatches2("INDEX", "CONCURRENTLY"))
+ /* If we have CREATE|UNIQUE INDEX CONCURRENTLY, then add "ON" */
+ else if (TailMatches2("INDEX", "CONCURRENTLY"))
COMPLETE_WITH_CONST("ON");
- /* If we have CREATE|UNIQUE INDEX <sth>, then add "ON" or "CONCURRENTLY" */
+ /* If we have CREATE|UNIQUE INDEX <sth>, then add "ON" */
else if (TailMatches3("CREATE|UNIQUE", "INDEX", MatchAny))
- COMPLETE_WITH_LIST2("CONCURRENTLY", "ON");
+ COMPLETE_WITH_CONST("ON");
/*
* Complete INDEX <name> ON <table> with a list of table columns (which
[parent: 70327030095d]