Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbc56d58

Browse files
committed
psql: Fix CREATE INDEX tab completion
The previous code supported a syntax like CREATE INDEX nameCONCURRENTLY, which never existed. Mistake introduced in commit37ec19a. Remove the addition ofCONCURRENTLY at that point.
1 parent7032703 commitbc56d58

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
elseif (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-
elseif (TailMatches3("INDEX",MatchAny,"CONCURRENTLY")||
2014-
TailMatches2("INDEX","CONCURRENTLY"))
2012+
/* If we have CREATE|UNIQUE INDEX CONCURRENTLY, then add "ON" */
2013+
elseif (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
elseif (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)

[8]ページ先頭

©2009-2025 Movatter.jp