Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-11-28 Thread Dean Rasheed
On Tue, 28 Nov 2023 at 03:42, Shubham Khanna wrote: > > I reviewed the given Patch and it is working fine. > Thanks for checking. Patch pushed. Regards, Dean

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-11-27 Thread Shubham Khanna
On Thu, Nov 23, 2023 at 4:37 PM Dean Rasheed wrote: > > On Mon, 14 Aug 2023 at 18:34, David Zhang wrote: > > > > it would be great to switch the order of the 3rd and the 4th line to make a > > better match for "CREATE" and "CREATE OR REPLACE" . > > > > I took a look at this, and I think it's prob

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-11-23 Thread Dean Rasheed
On Mon, 14 Aug 2023 at 18:34, David Zhang wrote: > > it would be great to switch the order of the 3rd and the 4th line to make a > better match for "CREATE" and "CREATE OR REPLACE" . > I took a look at this, and I think it's probably neater to keep the "AS SELECT" completion for CREATE [OR REPLAC

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-09-05 Thread Peter Eisentraut
I noticed that on this commitfest entry (https://commitfest.postgresql.org/44/4491/), the reviewers were assigned by the patch author (presumably because they had previously contributed to this thread). Unless these individuals know about that, this is unlikely to work out. It's better to rem

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-08-14 Thread David Zhang
[..] For below changes, else if (TailMatches("CREATE", "VIEW", MatchAny, "AS") || -             TailMatches("CREATE", "OR", "REPLACE", "VIEW", MatchAny, "AS")) +             TailMatches("CREATE", "VIEW", MatchAny, "WITH", "(*)", "AS") || +             TailMatches("CREATE", "OR", "REPLAC

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-08-12 Thread Christoph Heiss
On Fri, Aug 11, 2023 at 12:48:17PM -0700, David Zhang wrote: > > Applied v3 patch to master and verified it with below commands, Thanks for testing! > [..] > > For below changes, > > else if (TailMatches("CREATE", "VIEW", MatchAny, "AS") || > -             TailMatches("CREATE", "OR", "REPLA

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-08-11 Thread David Zhang
Applied v3 patch to master and verified it with below commands, #Alter view postgres=# alter view v ALTER COLUMN  OWNER TO  RENAME    RESET (   SET postgres=# alter view v set (   SCHEMA postgres=# alter view v set ( CHECK_OPTION  SECURITY_BARRIER  SECURITY_INVOKER post

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-08-08 Thread Christoph Heiss
On Tue, Aug 08, 2023 at 09:17:51AM +0100, Dean Rasheed wrote: > > On Mon, 7 Aug 2023 at 19:49, Christoph Heiss wrote: > > > > On Fri, Jan 06, 2023 at 12:18:44PM +, Dean Rasheed wrote: > > > Hmm, I don't think we should be offering "check_option" as a tab > > > completion for CREATE VIEW at a

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-08-08 Thread Dean Rasheed
On Mon, 7 Aug 2023 at 19:49, Christoph Heiss wrote: > > On Fri, Jan 06, 2023 at 12:18:44PM +, Dean Rasheed wrote: > > Hmm, I don't think we should be offering "check_option" as a tab > > completion for CREATE VIEW at all, since that would encourage users to > > use non-SQL-standard syntax, rat

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-08-07 Thread Christoph Heiss
Hi all, sorry for the long delay. On Mon, Jan 09, 2023 at 04:32:09PM +0100, Jim Jones wrote: > However, an "ALTER TABLE S" does not complete the open > parenthesis "(" from "SET (", as suggested in "ALTER VIEW ". > > postgres=# ALTER VIEW w SET > Display all 187 possibilities? (y or n) > > Is i

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-07-06 Thread Daniel Gustafsson
> On 29 Jan 2023, at 11:19, Mikhail Gribkov wrote: > The new status of this patch is: Waiting on Author This patch has been Waiting on Author since January with the thread being stale, so I am marking this as Returned with Feedback for now. Please feel free to resubmit to a future CF when there

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-03-20 Thread Gregory Stark (as CFM)
On Sun, 29 Jan 2023 at 05:20, Mikhail Gribkov wrote: > > The problem is obviously in the newly added second line of the following > clause: > COMPLETE_WITH("ALTER COLUMN", "OWNER TO", "RENAME", > "SET SCHEMA", "SET (", "RESET ("); > > "set

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-01-29 Thread Mikhail Gribkov
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, failed Documentation:tested, passed Hi Christoph, The patch have a potential, although I have to

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-01-11 Thread Thomas Munro
On Thu, Jan 12, 2023 at 5:50 AM vignesh C wrote: > For some reason CFBot is not able to apply the patch, please have a > look and post an updated version if required, also check and handle > Dean Rasheed and Jim Jones comment if applicable: > === Applying patches on top of PostgreSQL commit ID >

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-01-11 Thread vignesh C
On Fri, 9 Dec 2022 at 16:01, Christoph Heiss wrote: > > Thanks for the review! > > On 12/8/22 12:19, Melih Mutlu wrote: > > Hi Christoph, > > > > I just took a quick look at your patch. > > Some suggestions: > > > > + else if (Matches("ALTER", "VIEW", MatchAny, "SET", "(")) > > + C

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-01-09 Thread Jim Jones
Hi Christoph, Thanks for the patch! I just tested it and I could reproduce the expected behaviour in these cases: postgres=# CREATE VIEW w AS  WITH ( postgres=# CREATE OR REPLACE VIEW w AS  WITH ( postgres=# CREATE VIEW w WITH ( CHECK_OPTION  SECURITY_BARRIER  SECURITY_INVOKER p

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-01-06 Thread Dean Rasheed
On Fri, 6 Jan 2023 at 11:52, vignesh C wrote: > > One suggestion: > Tab completion for "alter view v1 set (check_option =" is handled to > complete with CASCADED and LOCAL but the same is not handled for > create view: "create view viewname with ( check_option =" > + else if (Matches("ALTER"

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-01-06 Thread vignesh C
On Fri, 9 Dec 2022 at 16:01, Christoph Heiss wrote: > > Thanks for the review! > > On 12/8/22 12:19, Melih Mutlu wrote: > > Hi Christoph, > > > > I just took a quick look at your patch. > > Some suggestions: > > > > + else if (Matches("ALTER", "VIEW", MatchAny, "SET", "(")) > > + C

Re: [PATCH] psql: Add tab-complete for optional view parameters

2022-12-09 Thread Christoph Heiss
Thanks for the review! On 12/8/22 12:19, Melih Mutlu wrote: Hi Christoph, I just took a quick look at your patch. Some suggestions: +   else if (Matches("ALTER", "VIEW", MatchAny, "SET", "(")) +       COMPLETE_WITH_LIST(view_optional_parameters); +   /* ALTER VIEW xxx RESET ( yyy ,

Re: [PATCH] psql: Add tab-complete for optional view parameters

2022-12-08 Thread Melih Mutlu
Hi Christoph, I just took a quick look at your patch. Some suggestions: + else if (Matches("ALTER", "VIEW", MatchAny, "SET", "(")) > + COMPLETE_WITH_LIST(view_optional_parameters); > + /* ALTER VIEW xxx RESET ( yyy , ... ) */ > + else if (Matches("ALTER", "VIEW", MatchAny, "RESET", "(