Commit 57f2ff00 authored by Peter Eisentraut's avatar Peter Eisentraut

psql: Update tab completion for ALTER SUBSCRIPTION

Author: Masahiko Sawada <sawada.mshk@gmail.com>
parent 8dc7c338
......@@ -1579,6 +1579,18 @@ psql_completion(const char *text, int start, int end)
{
/* complete with nothing here as this refers to remote publications */
}
/* ALTER SUBSCRIPTION <name> SET PUBLICATION <name> */
else if (HeadMatches3("ALTER", "SUBSCRIPTION", MatchAny) &&
TailMatches3("SET", "PUBLICATION", MatchAny))
{
COMPLETE_WITH_CONST("WITH (");
}
/* ALTER SUBSCRIPTION <name> SET PUBLICATION <name> WITH ( */
else if (HeadMatches3("ALTER", "SUBSCRIPTION", MatchAny) &&
TailMatches5("SET", "PUBLICATION", MatchAny, "WITH", "("))
{
COMPLETE_WITH_LIST2("copy_data", "refresh");
}
/* ALTER SCHEMA <name> */
else if (Matches3("ALTER", "SCHEMA", MatchAny))
COMPLETE_WITH_LIST2("OWNER TO", "RENAME TO");
......
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