Skip to content

Commit 57f2ff0

Browse files
committed
psql: Update tab completion for ALTER SUBSCRIPTION
Author: Masahiko Sawada <sawada.mshk@gmail.com>
1 parent 8dc7c33 commit 57f2ff0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/bin/psql/tab-complete.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,18 @@ psql_completion(const char *text, int start, int end)
15791579
{
15801580
/* complete with nothing here as this refers to remote publications */
15811581
}
1582+
/* ALTER SUBSCRIPTION <name> SET PUBLICATION <name> */
1583+
else if (HeadMatches3("ALTER", "SUBSCRIPTION", MatchAny) &&
1584+
TailMatches3("SET", "PUBLICATION", MatchAny))
1585+
{
1586+
COMPLETE_WITH_CONST("WITH (");
1587+
}
1588+
/* ALTER SUBSCRIPTION <name> SET PUBLICATION <name> WITH ( */
1589+
else if (HeadMatches3("ALTER", "SUBSCRIPTION", MatchAny) &&
1590+
TailMatches5("SET", "PUBLICATION", MatchAny, "WITH", "("))
1591+
{
1592+
COMPLETE_WITH_LIST2("copy_data", "refresh");
1593+
}
15821594
/* ALTER SCHEMA <name> */
15831595
else if (Matches3("ALTER", "SCHEMA", MatchAny))
15841596
COMPLETE_WITH_LIST2("OWNER TO", "RENAME TO");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy