Skip to content

Commit af9773c

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

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/bin/psql/tab-complete.c

Lines 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)
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