Skip to content

Commit 96c498d

Browse files
author
Amit Kapila
committed
Add tab-completion for newly added SUBSCRIPTION options.
Commits c3afe8c and 4826759 added new subscription options "password_required" and "run_as_owner". This patch adds tab-completion for these newly added options. Author: Peter Smith Discussion: https://postgr.es/m/CAHut+Pu=pnJf=SS1583pknSQ3CbOqLCkWcJCQYt6zxTagHEdmw@mail.gmail.com
1 parent 8fcb32d commit 96c498d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bin/psql/tab-complete.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,8 @@ psql_completion(const char *text, int start, int end)
19251925
COMPLETE_WITH("(", "PUBLICATION");
19261926
/* ALTER SUBSCRIPTION <name> SET ( */
19271927
else if (HeadMatches("ALTER", "SUBSCRIPTION", MatchAny) && TailMatches("SET", "("))
1928-
COMPLETE_WITH("binary", "disable_on_error", "origin", "slot_name",
1928+
COMPLETE_WITH("binary", "disable_on_error", "origin",
1929+
"password_required", "run_as_owner", "slot_name",
19291930
"streaming", "synchronous_commit");
19301931
/* ALTER SUBSCRIPTION <name> SKIP ( */
19311932
else if (HeadMatches("ALTER", "SUBSCRIPTION", MatchAny) && TailMatches("SKIP", "("))
@@ -3268,7 +3269,8 @@ psql_completion(const char *text, int start, int end)
32683269
/* Complete "CREATE SUBSCRIPTION <name> ... WITH ( <opt>" */
32693270
else if (HeadMatches("CREATE", "SUBSCRIPTION") && TailMatches("WITH", "("))
32703271
COMPLETE_WITH("binary", "connect", "copy_data", "create_slot",
3271-
"disable_on_error", "enabled", "origin", "slot_name",
3272+
"disable_on_error", "enabled", "origin",
3273+
"password_required", "run_as_owner", "slot_name",
32723274
"streaming", "synchronous_commit", "two_phase");
32733275

32743276
/* CREATE TRIGGER --- is allowed inside CREATE SCHEMA, so use TailMatches */

0 commit comments

Comments
 (0)