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

Appearance settings

Commit af9773c

Browse filesBrowse files
committed
When completing ALTER INDEX .. SET, add an equals sign also.
Jeff Janes
1 parent 6e71dd7 commit af9773c
Copy full SHA for af9773c

File tree

Expand file treeCollapse file tree

1 file changed

+11
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-2
lines changed

‎src/bin/psql/tab-complete.c

Copy file name to clipboardExpand all lines: src/bin/psql/tab-complete.c
+11-2Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,15 +1216,24 @@ psql_completion(const char *text, int start, int end)
12161216
/* ALTER INDEX <foo> SET|RESET ( */
12171217
else if (pg_strcasecmp(prev5_wd, "ALTER") == 0 &&
12181218
pg_strcasecmp(prev4_wd, "INDEX") == 0 &&
1219-
(pg_strcasecmp(prev2_wd, "SET") == 0 ||
1220-
pg_strcasecmp(prev2_wd, "RESET") == 0) &&
1219+
pg_strcasecmp(prev2_wd, "RESET") == 0 &&
12211220
pg_strcasecmp(prev_wd, "(") == 0)
12221221
{
12231222
static const char *const list_INDEXOPTIONS[] =
12241223
{"fillfactor", "fastupdate", "gin_pending_list_limit", NULL};
12251224

12261225
COMPLETE_WITH_LIST(list_INDEXOPTIONS);
12271226
}
1227+
else if (pg_strcasecmp(prev5_wd, "ALTER") == 0 &&
1228+
pg_strcasecmp(prev4_wd, "INDEX") == 0 &&
1229+
pg_strcasecmp(prev2_wd, "SET") == 0 &&
1230+
pg_strcasecmp(prev_wd, "(") == 0)
1231+
{
1232+
static const char *const list_INDEXOPTIONS[] =
1233+
{"fillfactor =", "fastupdate =", "gin_pending_list_limit =", NULL};
1234+
1235+
COMPLETE_WITH_LIST(list_INDEXOPTIONS);
1236+
}
12281237

12291238
/* ALTER LANGUAGE <name> */
12301239
else if (pg_strcasecmp(prev3_wd, "ALTER") == 0 &&

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.