Re: GRANT USAGE ON SEQUENCE missing from psql command completion

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: GRANT USAGE ON SEQUENCE missing from psql command completion
Date: 2015-10-01 19:41:16
Message-ID: CAEepm=0SpZc9cPMvhszeAu0D8xcXrnj4=t=u6JT0ZGAw3pwJAA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Oct 2, 2015 at 7:48 AM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> On 10/01/2015 07:40 AM, Fujii Masao wrote:
>> On Thu, Oct 1, 2015 at 2:03 AM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
>>> On Tue, Sep 29, 2015 at 12:59 PM, Thomas Munro
>>> <thomas(dot)munro(at)enterprisedb(dot)com> wrote:
>>>>
>>>> On Wed, Sep 30, 2015 at 5:59 AM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
>>>>> Since this commit, "grant update on foobar to " will tab complete to add
>>>>> an
>>>>> extra "TO", rather than with a list of roles.
>>>>
>>>> Oops, thanks. Here is a patch to fix that by moving the branch that
>>>> matches "GRANT/REVOKE * ON * *" after the branch that matches
>>>> "GRANT/REVOKE ... TO/FROM".
>>>>
>>>
>>> Looks good to me, thanks.
>>
>> Applied. Thanks!
>
> Wow, I had no idea this was going to be such a difficult fix ...

Well, a 3 line patch for the specific problem you reported was posted
straight away.

The rest of this thread got carried away filling out a bunch of other
GRANT/REVOKE completions! And there are probably more things to do
(for example WITH GRANT OPTION).

FWIW I am hoping to make it a bit less cumbersome to maintain the
completion code in the next CF:
https://commitfest.postgresql.org/7/375/

--
Thomas Munro
http://www.enterprisedb.com

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2015-10-01 23:21:59 Re: BUG #13656: table inheritance, pg_dump emits same constraint for all inheritors causing errors
Previous Message cpacejo 2015-10-01 18:51:44 BUG #13660: serializable snapshotting hangs