From: Peter Eisentraut Date: Fri, 9 Jun 2017 14:17:06 +0000 (-0400) Subject: psql: Update tab completion for ALTER SUBSCRIPTION X-Git-Tag: REL_10_BETA2~195 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57f2ff00d7e25ffe33d7e2955428c005d2511277;p=postgresql psql: Update tab completion for ALTER SUBSCRIPTION Author: Masahiko Sawada --- diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index d4b6976ad3..92cc8aa97a 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -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 SET PUBLICATION */ + else if (HeadMatches3("ALTER", "SUBSCRIPTION", MatchAny) && + TailMatches3("SET", "PUBLICATION", MatchAny)) + { + COMPLETE_WITH_CONST("WITH ("); + } + /* ALTER SUBSCRIPTION SET PUBLICATION WITH ( */ + else if (HeadMatches3("ALTER", "SUBSCRIPTION", MatchAny) && + TailMatches5("SET", "PUBLICATION", MatchAny, "WITH", "(")) + { + COMPLETE_WITH_LIST2("copy_data", "refresh"); + } /* ALTER SCHEMA */ else if (Matches3("ALTER", "SCHEMA", MatchAny)) COMPLETE_WITH_LIST2("OWNER TO", "RENAME TO");