On Fri, May 14, 2021 at 12:25 PM Bharath Rupireddy <bharath.rupireddyforpostg...@gmail.com> wrote: > > On Fri, May 14, 2021 at 12:00 PM vignesh C <vignes...@gmail.com> wrote: > > > > Hi, > > > > While I was reviewing one of the logical decoding features, I found > > Streaming and binary options were missing in tab completion for the > > alter subscription set option, the attached patch has the changes for > > the same. > > Thoughts? > > +1. > > Without patch: > postgres=# alter subscription testsub set (S > SLOT_NAME SYNCHRONOUS_COMMIT > > With patch: > postgres=# alter subscription testsub set ( > BINARY SLOT_NAME STREAMING SYNCHRONOUS_COMMIT > > How about ordering the options alphabetically as the tab complete > output anyways shows that way? I'm not sure if that's the practice, > but just a thought.
I did not see any rule for this, but also did not see any harm in keeping it in alphabetical order, so changed it in the attached patch. Regards, Vignesh
From 0d209ae307841827aec5478a4ca3f8e3d945eef3 Mon Sep 17 00:00:00 2001 From: vignesh <vignes...@gmail.com> Date: Fri, 14 May 2021 11:37:05 +0530 Subject: [PATCH v2] Added missing tab completion for alter subscription set option. Streaming and binary options were missing in tab completion for alter subscription set option, included it. --- src/bin/psql/tab-complete.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 6598c5369a..1b9661fb24 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -1665,7 +1665,7 @@ psql_completion(const char *text, int start, int end) COMPLETE_WITH("(", "PUBLICATION"); /* ALTER SUBSCRIPTION <name> SET ( */ else if (HeadMatches("ALTER", "SUBSCRIPTION", MatchAny) && TailMatches("SET", "(")) - COMPLETE_WITH("slot_name", "synchronous_commit"); + COMPLETE_WITH("binary", "slot_name", "streaming", "synchronous_commit"); /* ALTER SUBSCRIPTION <name> SET PUBLICATION */ else if (HeadMatches("ALTER", "SUBSCRIPTION", MatchAny) && TailMatches("SET", "PUBLICATION")) { -- 2.25.1