Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2023-06-30 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Tue, May 09, 2023 at 12:26:16PM +0900, Michael Paquier wrote: >> That looks pretty much OK to me. One tiny comment I have is that this >> lacks brackets for the inner blocks, so I have added some in the v4 >> attached. > > The indentation was a bit wrong, so fixed

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2023-06-29 Thread Michael Paquier
On Tue, May 09, 2023 at 12:26:16PM +0900, Michael Paquier wrote: > That looks pretty much OK to me. One tiny comment I have is that this > lacks brackets for the inner blocks, so I have added some in the v4 > attached. The indentation was a bit wrong, so fixed it, and applied on HEAD. -- Michael

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2023-05-08 Thread Michael Paquier
On Mon, May 08, 2023 at 05:36:27PM +0100, Dagfinn Ilmari Mannsåker wrote: > Here's an updated v3 patch with that. While adding that, I noticed that > CREATE UNLOGGED only tab-completes TABLE and MATERIALIZED VIEW, not > SEQUENCE, so I added that (and removed MATERIALIZED VIEW when part of >

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2023-05-08 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Tue, May 02, 2023 at 01:19:49PM +0100, Dagfinn Ilmari Mannsåker wrote: >> Dagfinn Ilmari Mannsåker writes: >>> This is for completing the word CREATE itself after CREATE SCHEMA >>> [[] AUTHORIZATION] . The things that can come after that >>> are already handled

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2023-05-05 Thread Michael Paquier
On Tue, May 02, 2023 at 01:19:49PM +0100, Dagfinn Ilmari Mannsåker wrote: > Dagfinn Ilmari Mannsåker writes: >> This is for completing the word CREATE itself after CREATE SCHEMA >> [[] AUTHORIZATION] . The things that can come after that >> are already handled generically earlier in the

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2023-05-02 Thread Dagfinn Ilmari Mannsåker
Dagfinn Ilmari Mannsåker writes: > Michael Paquier writes: > >> On Sat, Apr 15, 2023 at 11:06:25AM +0900, Michael Paquier wrote: >>> Thanks, I'll look at it. >> >> + else if (Matches("CREATE", "SCHEMA", "AUTHORIZATION", MatchAny) || >> +Matches("CREATE", "SCHEMA", MatchAny,

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2023-05-02 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Sat, Apr 15, 2023 at 11:06:25AM +0900, Michael Paquier wrote: >> Thanks, I'll look at it. > > + else if (Matches("CREATE", "SCHEMA", "AUTHORIZATION", MatchAny) || > +Matches("CREATE", "SCHEMA", MatchAny, "AUTHORIZATION", MatchAny)) > +

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2023-05-01 Thread Michael Paquier
On Sat, Apr 15, 2023 at 11:06:25AM +0900, Michael Paquier wrote: > Thanks, I'll look at it. + else if (Matches("CREATE", "SCHEMA", "AUTHORIZATION", MatchAny) || +Matches("CREATE", "SCHEMA", MatchAny, "AUTHORIZATION", MatchAny)) + COMPLETE_WITH("CREATE", "GRANT"); + else if

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2023-04-14 Thread Michael Paquier
On Fri, Apr 14, 2023 at 05:04:35PM +0100, Dagfinn Ilmari Mannsåker wrote: > Looks like I completely dropped the ball on this one, sorry. So did I ;) > Here's a > rebased patch which uses the new COMPLETE_WITH_QUERY_PLUS functionality > added in commit 02b8048ba5dc36238f3e7c3c58c5946220298d71.

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2023-04-14 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Wed, Aug 11, 2021 at 10:16:15AM +0900, Michael Paquier wrote: >> + else if (Matches("CREATE", "SCHEMA", "AUTHORIZATION")) >> + COMPLETE_WITH_QUERY(Query_for_list_of_owner_roles); >> + else if (Matches("CREATE", "SCHEMA", MatchAny,

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2021-12-02 Thread Michael Paquier
On Wed, Aug 11, 2021 at 10:16:15AM +0900, Michael Paquier wrote: > + else if (Matches("CREATE", "SCHEMA", "AUTHORIZATION")) > + COMPLETE_WITH_QUERY(Query_for_list_of_owner_roles); > + else if (Matches("CREATE", "SCHEMA", MatchAny, "AUTHORIZATION")) > +

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2021-08-11 Thread Suraj Khamkar
Thanks Dagfinn for the updated patches. I do not get these errors, neither with the patch file I still have > locally, or by saving the attachment from my original email. Are you > sure something in your download process hasn't converted it to Windows > line endings (\r\n), or otherwise mangled

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2021-08-10 Thread Michael Paquier
On Mon, Aug 09, 2021 at 07:00:02PM +0100, Dagfinn Ilmari Mannsåker wrote: > Thanks for the review. Updated patch attached, with the CURRENT/SESSION > ROLE/USER changes for other commands separated out. +#define Query_for_list_of_owner_roles \ +Query_for_list_of_roles \ " UNION ALL SELECT

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2021-08-09 Thread Dagfinn Ilmari Mannsåker
Hi Suraj, Suraj Khamkar writes: > Hello Dagfinn, > > I had a look at your patch and below are my review comments. > Please correct me if I am missing something. > >1. For me the patch does not apply cleanly. I have been facing the error >of trailing whitespaces. I do not get these

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2021-08-09 Thread Suraj Khamkar
Hello Dagfinn, I had a look at your patch and below are my review comments. Please correct me if I am missing something. 1. For me the patch does not apply cleanly. I have been facing the error of trailing whitespaces. surajkhamkar@localhost:postgres$ git apply

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2021-08-07 Thread Dagfinn Ilmari Mannsåker
ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > >> Hi Hackers, >> >> I just noticed there's no tab completion for CREATE SCHEMA >> AUTHORIZATION, nor for anything after CREATE SCHEMA . >> >> Please find attached a patch that adds this.

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2021-07-15 Thread Dagfinn Ilmari Mannsåker
ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > Hi Hackers, > > I just noticed there's no tab completion for CREATE SCHEMA > AUTHORIZATION, nor for anything after CREATE SCHEMA . > > Please find attached a patch that adds this. Added to the 2021-09 commit fest:

Tab completion for CREATE SCHEMAAUTHORIZATION

2021-07-09 Thread Dagfinn Ilmari Mannsåker
Hi Hackers, I just noticed there's no tab completion for CREATE SCHEMA AUTHORIZATION, nor for anything after CREATE SCHEMA . Please find attached a patch that adds this. - ilmari >From db02df7ea8d3a5db41268edd8c311a3631c9e9ad Mon Sep 17 00:00:00 2001 From: