Re: Fix some newly modified tab-complete changes

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix some newly modified tab-complete changes
Date: 2022-10-04 08:16:36
Message-ID: CAHut+PtehqAtqJD6sbguzFmivAScur1isXx+gsrmqtTLGRKJBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 29, 2022 at 12:50 PM shiy(dot)fnst(at)fujitsu(dot)com
<shiy(dot)fnst(at)fujitsu(dot)com> wrote:
>
> On Wed, Sep 28, 2022 1:49 PM Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote:
> >
> > At Wed, 28 Sep 2022 14:14:01 +1000, Peter Smith
> > <smithpb2250(at)gmail(dot)com> wrote in
...
> > >
> > > 2. tab complete for GRANT
> > >
> > > test_pub=# grant <tab>
> > > ALL EXECUTE
> > > pg_execute_server_program pg_read_server_files postgres
> > > TRIGGER
> > > ALTER SYSTEM GRANT pg_monitor
> > > pg_signal_backend REFERENCES
> > > TRUNCATE
> > > CONNECT INSERT pg_read_all_data
> > > pg_stat_scan_tables SELECT UPDATE
> > > CREATE pg_checkpoint
> > > pg_read_all_settings pg_write_all_data SET
> > > USAGE
> > > DELETE pg_database_owner
> > > pg_read_all_stats pg_write_server_files TEMPORARY
> > >
> > > 2a.
> > > grant "GRANT" ??
> >
> > Yeah, for the mement I thought that might a kind of admin option but
> > there's no such a privilege. REVOKE gets the same suggestion.
> >
>
> Maybe that's for "REVOKE GRANT OPTION FOR". But it is used by both GRANT and
> REVOKE. I think it's a separate problem, I have tried to fix it in the attached
> 0002 patch.
>

I checked your v2-0002 patch and AFAICT it does fix properly the
previously reported GRANT/REVOKE problem.

~

But, while testing I noticed another different quirk

It seems that neither the GRANT nor the REVOKE auto-complete
recognises the optional PRIVILEGE keyword

e.g. GRANT ALL <tab> --> ON (but not PRIVILEGE)
e.g. GRANT ALL PRIV<tab> --> ???

e.g. REVOKE ALL <tab> --> ON (but not PRIVILEGE)..
e.g. REVOKE ALL PRIV<tab> --> ???

------
Kind Regards,
Peter Smith.
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2022-10-04 08:18:43 Re: log_heap_visible(): remove unused parameter and update comment
Previous Message Peter Eisentraut 2022-10-04 08:15:13 pid_t on mingw