Commit b9c3de62 authored by Tom Lane's avatar Tom Lane

Tab completion: offer parens as appropriate in CREATE/ALTER TEXT SEARCH.

Jeff Janes, Georgios Kokolatos

Discussion: https://postgr.es/m/CAMkU=1wU=vgxnvwy2HswLUVvoawrkrjZYeKXMr3w3p=_NNbGhQ@mail.gmail.com
parent ea7dace2
...@@ -2140,7 +2140,7 @@ psql_completion(const char *text, int start, int end) ...@@ -2140,7 +2140,7 @@ psql_completion(const char *text, int start, int end)
else if (Matches("ALTER", "TEXT", "SEARCH", "TEMPLATE|PARSER", MatchAny)) else if (Matches("ALTER", "TEXT", "SEARCH", "TEMPLATE|PARSER", MatchAny))
COMPLETE_WITH("RENAME TO", "SET SCHEMA"); COMPLETE_WITH("RENAME TO", "SET SCHEMA");
else if (Matches("ALTER", "TEXT", "SEARCH", "DICTIONARY", MatchAny)) else if (Matches("ALTER", "TEXT", "SEARCH", "DICTIONARY", MatchAny))
COMPLETE_WITH("OWNER TO", "RENAME TO", "SET SCHEMA"); COMPLETE_WITH("(", "OWNER TO", "RENAME TO", "SET SCHEMA");
else if (Matches("ALTER", "TEXT", "SEARCH", "CONFIGURATION", MatchAny)) else if (Matches("ALTER", "TEXT", "SEARCH", "CONFIGURATION", MatchAny))
COMPLETE_WITH("ADD MAPPING FOR", "ALTER MAPPING", COMPLETE_WITH("ADD MAPPING FOR", "ALTER MAPPING",
"DROP MAPPING FOR", "DROP MAPPING FOR",
...@@ -2635,7 +2635,7 @@ psql_completion(const char *text, int start, int end) ...@@ -2635,7 +2635,7 @@ psql_completion(const char *text, int start, int end)
/* CREATE TEXT SEARCH */ /* CREATE TEXT SEARCH */
else if (Matches("CREATE", "TEXT", "SEARCH")) else if (Matches("CREATE", "TEXT", "SEARCH"))
COMPLETE_WITH("CONFIGURATION", "DICTIONARY", "PARSER", "TEMPLATE"); COMPLETE_WITH("CONFIGURATION", "DICTIONARY", "PARSER", "TEMPLATE");
else if (Matches("CREATE", "TEXT", "SEARCH", "CONFIGURATION", MatchAny)) else if (Matches("CREATE", "TEXT", "SEARCH", "CONFIGURATION|DICTIONARY|PARSER|TEMPLATE", MatchAny))
COMPLETE_WITH("("); COMPLETE_WITH("(");
/* CREATE SUBSCRIPTION */ /* CREATE SUBSCRIPTION */
......
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