Improve tab-completion for ALTER INDEX RESET/SET.
authorFujii Masao <fujii@postgresql.org>
Fri, 2 Mar 2018 16:41:01 +0000 (01:41 +0900)
committerFujii Masao <fujii@postgresql.org>
Fri, 2 Mar 2018 16:41:01 +0000 (01:41 +0900)
Author: Masahiko Sawada
Discussion: https://postgr.es/m/CAD21AoDSGfB0G4egOy2UvBT=uihojuh-syxgSipj+XNkpWdVzQ@mail.gmail.com

src/bin/psql/tab-complete.c

index 8bc4a194a53367c164b13b7f607f0e6820e90147..53f0d945ab2de0aef387820b06536b32351a371c 100644 (file)
@@ -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))