aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2016-01-10 11:43:27 -0500
committerPeter Eisentraut <peter_e@gmx.net>2016-01-12 20:54:27 -0500
commitbc56d5898d1cbd9dee6fe16ea7a814a5820b6181 (patch)
tree11bee22a2ddddf81d380a61fb80b15f70dc5c088
parent70327030095d07abb58f9b3452dc6315a02aff0e (diff)
downloadpostgresql-bc56d5898d1cbd9dee6fe16ea7a814a5820b6181.tar.gz
postgresql-bc56d5898d1cbd9dee6fe16ea7a814a5820b6181.zip
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.
-rw-r--r--src/bin/psql/tab-complete.c9
1 files 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