Commit 1e324cb0 authored by Alvaro Herrera's avatar Alvaro Herrera

Add tab-completion for ALTER INDEX .. [NO] DEPENDS ON

... as added in the prior commit.

(We'd like to have tab-completion for the other object types too, but
they don't have sub-command completion yet.)

Author: Ibrar Ahmed <ibrar.ahmad@gmail.com>
Reviewed-by: default avatarÁlvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/CALtqXTcogrFEVP9uou5vFtnGsn+vHZUu9+9a0inarfYVOHScYQ@mail.gmail.com
parent 5fc70394
...@@ -1709,7 +1709,7 @@ psql_completion(const char *text, int start, int end) ...@@ -1709,7 +1709,7 @@ psql_completion(const char *text, int start, int end)
/* ALTER INDEX <name> */ /* ALTER INDEX <name> */
else if (Matches("ALTER", "INDEX", MatchAny)) else if (Matches("ALTER", "INDEX", MatchAny))
COMPLETE_WITH("ALTER COLUMN", "OWNER TO", "RENAME TO", "SET", COMPLETE_WITH("ALTER COLUMN", "OWNER TO", "RENAME TO", "SET",
"RESET", "ATTACH PARTITION"); "RESET", "ATTACH PARTITION", "DEPENDS", "NO DEPENDS");
else if (Matches("ALTER", "INDEX", MatchAny, "ATTACH")) else if (Matches("ALTER", "INDEX", MatchAny, "ATTACH"))
COMPLETE_WITH("PARTITION"); COMPLETE_WITH("PARTITION");
else if (Matches("ALTER", "INDEX", MatchAny, "ATTACH", "PARTITION")) else if (Matches("ALTER", "INDEX", MatchAny, "ATTACH", "PARTITION"))
...@@ -1755,6 +1755,10 @@ psql_completion(const char *text, int start, int end) ...@@ -1755,6 +1755,10 @@ psql_completion(const char *text, int start, int end)
"buffering =", /* GiST */ "buffering =", /* GiST */
"pages_per_range =", "autosummarize =" /* BRIN */ "pages_per_range =", "autosummarize =" /* BRIN */
); );
else if (Matches("ALTER", "INDEX", MatchAny, "NO", "DEPENDS"))
COMPLETE_WITH("ON EXTENSION");
else if (Matches("ALTER", "INDEX", MatchAny, "DEPENDS"))
COMPLETE_WITH("ON EXTENSION");
/* ALTER LANGUAGE <name> */ /* ALTER LANGUAGE <name> */
else if (Matches("ALTER", "LANGUAGE", MatchAny)) else if (Matches("ALTER", "LANGUAGE", MatchAny))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment