Re: GRANT USAGE ON SEQUENCE missing from psql command completion

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: GRANT USAGE ON SEQUENCE missing from psql command completion
Date: 2015-09-29 16:59:09
Message-ID: CAMkU=1y4WDrbQef8v0jRQvQ0BVyFV0CiSUJ4AHe9r9Ky1+MJ+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Sep 8, 2015 at 10:02 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:

> On Sat, Sep 5, 2015 at 9:43 PM, Thomas Munro
> <thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> > On Fri, Sep 4, 2015 at 8:16 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
> wrote:
> >>
> >> On Fri, Sep 4, 2015 at 7:24 AM, Thomas Munro
> >> <thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> >> > On Fri, Sep 4, 2015 at 12:02 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
> >> > wrote:
> >> >>
> >> >> On Wed, Sep 2, 2015 at 10:14 AM, Michael Paquier
> >> >> <michael(dot)paquier(at)gmail(dot)com> wrote:
> >> >> > On Tue, Sep 1, 2015 at 10:15 PM, Thomas Munro wrote:
> >> >> >> Here is a version that splits that monster up into three small
> >> >> >> smaller
> >> >> >> blocks, and makes sure that GRANT goes with TO and REVOKE goes
> with
> >> >> >> FROM
> >> >> >> before completing with roles.
> >> >> >>
> >> >> >> Unfortunately your first example "GRANT ... FROM <tab>" still gets
> >> >> >> inappropriate completion because of the general FROM-matching
> branch
> >> >> >> with
> >> >> >> comment /* ... FROM ... */ that comes near the end, but it didn't
> >> >> >> seem
> >> >> >> sensible to start teaching the general FROM branch about avoiding
> >> >> >> this
> >> >> >> specific invalid production when it's happy to complete "BANANA
> FROM
> >> >> >> <tab>".
> >> >> >
> >> >> > OK, let's live with that, tab completion would just have an
> incorrect
> >> >> > suggestion only once "from" is written completely with a space
> added
> >> >> > after it. Your patch improves many areas anyway, and that's just a
> >> >> > small point, hence let's have a committer look at it.
> >> >>
> >> >> "GRANT xxx ON FOREIGN DATA WRAPPER yyy <tab>" should suggest "TO"?
> >> >> "GRANT xxx ON FOREIGN DATA WRAPPER yyy TO <tab>" should suggest the
> >> >> roles?
> >> >> "GRANT xxx ON FOREIGN SERVER <tab>" should suggest foreign servers?
> >> >> "GRANT xxx ON FOREIGN SERVER yyy <tab>" should suggest "TO"?
> >> >> "GRANT xxx ON FOREIGN SERVER yyy TO <tab>" should suggest the roles?
> >> >
> >> >
> >> > Thanks. New version attached that handles these to.
> >>
> >> Thanks for updating the patch!
> >> Attached is the updated version of the patch. Could you review this?
> >
> >
> > Thanks for the review and the improvements!
>
> So applied. Thanks a lot!
>

Since this commit, "grant update on foobar to " will tab complete to add an
extra "TO", rather than with a list of roles.

Cheers,

Jeff

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alex Hunsaker 2015-09-29 19:22:03 Re: BUG #13638: Exception texts from plperl has bad encoding
Previous Message Maris Radu 2015-09-29 16:08:36 Re: BUG #13652: Function names as a table prefiex by underscore, confused with array