Commit bc56d589 authored by Peter Eisentraut's avatar Peter Eisentraut

psql: Fix CREATE INDEX tab completion

The previous code supported a syntax like CREATE INDEX name
CONCURRENTLY, which never existed.  Mistake introduced in commit
37ec19a1.  Remove the addition of
CONCURRENTLY at that point.
parent 70327030
...@@ -2009,13 +2009,12 @@ psql_completion(const char *text, int start, int end) ...@@ -2009,13 +2009,12 @@ psql_completion(const char *text, int start, int end)
else if (TailMatches3("INDEX", MatchAny, "ON") || else if (TailMatches3("INDEX", MatchAny, "ON") ||
TailMatches2("INDEX|CONCURRENTLY", "ON")) TailMatches2("INDEX|CONCURRENTLY", "ON"))
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tm, NULL); COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tm, NULL);
/* If we have CREATE|UNIQUE INDEX <sth> CONCURRENTLY, then add "ON" */ /* If we have CREATE|UNIQUE INDEX CONCURRENTLY, then add "ON" */
else if (TailMatches3("INDEX", MatchAny, "CONCURRENTLY") || else if (TailMatches2("INDEX", "CONCURRENTLY"))
TailMatches2("INDEX", "CONCURRENTLY"))
COMPLETE_WITH_CONST("ON"); 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)) 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 * Complete INDEX <name> ON <table> with a list of table columns (which
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment