Skip to content

Commit bc56d58

Browse files
committed
psql: Fix CREATE INDEX tab completion
The previous code supported a syntax like CREATE INDEX name CONCURRENTLY, which never existed. Mistake introduced in commit 37ec19a. Remove the addition of CONCURRENTLY at that point.
1 parent 7032703 commit bc56d58

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/bin/psql/tab-complete.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2009,13 +2009,12 @@ psql_completion(const char *text, int start, int end)
20092009
else if (TailMatches3("INDEX", MatchAny, "ON") ||
20102010
TailMatches2("INDEX|CONCURRENTLY", "ON"))
20112011
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tm, NULL);
2012-
/* If we have CREATE|UNIQUE INDEX <sth> CONCURRENTLY, then add "ON" */
2013-
else if (TailMatches3("INDEX", MatchAny, "CONCURRENTLY") ||
2014-
TailMatches2("INDEX", "CONCURRENTLY"))
2012+
/* If we have CREATE|UNIQUE INDEX CONCURRENTLY, then add "ON" */
2013+
else if (TailMatches2("INDEX", "CONCURRENTLY"))
20152014
COMPLETE_WITH_CONST("ON");
2016-
/* If we have CREATE|UNIQUE INDEX <sth>, then add "ON" or "CONCURRENTLY" */
2015+
/* If we have CREATE|UNIQUE INDEX <sth>, then add "ON" */
20172016
else if (TailMatches3("CREATE|UNIQUE", "INDEX", MatchAny))
2018-
COMPLETE_WITH_LIST2("CONCURRENTLY", "ON");
2017+
COMPLETE_WITH_CONST("ON");
20192018

20202019
/*
20212020
* Complete INDEX <name> ON <table> with a list of table columns (which

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy