psql tab completion for ALTER INDEX SET
Hi,
I found that tab completion for ALTER INDEX SET [tab] doesn't support
the reloptions of brin and gist. Attached patch adds "buffering",
"pages_per_range" and "autosummarize" options.
Regards,
--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
Attachments:
tab_completion_for_alter_index_set.patchapplication/octet-stream; name=tab_completion_for_alter_index_set.patchDownload
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 8bc4a19..28b6dd4 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -1711,11 +1711,17 @@ psql_completion(const char *text, int start, int end)
COMPLETE_WITH_CONST("(");
/* ALTER INDEX <foo> SET|RESET ( */
else if (Matches5("ALTER", "INDEX", MatchAny, "RESET", "("))
- COMPLETE_WITH_LIST3("fillfactor", "fastupdate",
- "gin_pending_list_limit");
+ COMPLETE_WITH_LIST6("fillfactor", "fastupdate",
+ "gin_pending_list_limit", /* GIN */
+ "buffering", /* GiST */
+ "pages_per_range", "autosummarize" /* BRIN */
+ );
else if (Matches5("ALTER", "INDEX", MatchAny, "SET", "("))
- COMPLETE_WITH_LIST3("fillfactor =", "fastupdate =",
- "gin_pending_list_limit =");
+ COMPLETE_WITH_LIST6("fillfactor =", "fastupdate =",
+ "gin_pending_list_limit =", /* GIN */
+ "buffering =", /* GiST */
+ "pages_per_range =", "autosummarize =" /* BRIN */
+ );
/* ALTER LANGUAGE <name> */
else if (Matches3("ALTER", "LANGUAGE", MatchAny))
On Fri, Mar 2, 2018 at 3:52 PM, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
Hi,
I found that tab completion for ALTER INDEX SET [tab] doesn't support
the reloptions of brin and gist. Attached patch adds "buffering",
"pages_per_range" and "autosummarize" options.
Thanks for the patch! Committed.
Regards,
--
Fujii Masao
On Sat, Mar 3, 2018 at 1:43 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
On Fri, Mar 2, 2018 at 3:52 PM, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
Hi,
I found that tab completion for ALTER INDEX SET [tab] doesn't support
the reloptions of brin and gist. Attached patch adds "buffering",
"pages_per_range" and "autosummarize" options.Thanks for the patch! Committed.
Thank you!
Regards,
--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center