Tab completion for GRANT MAINTAIN

Поиск
Список
Период
Сортировка
Искать

Tab completion for GRANT MAINTAIN

От:
Ken Kato <katouknl@oss.nttdata.com>
Дата:
Вложения:
Hi hackers,

I found that GRANT MAINTAIN is not tab-completed with ON, so here is a 
patch.

Best wishes,

-- 
Ken Kato
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Re: Tab completion for GRANT MAINTAIN

От:
Jim Jones <jim.jones@uni-muenster.de>
Дата:
On 18.04.23 11:08, Ken Kato wrote:
> Hi hackers,
>
> I found that GRANT MAINTAIN is not tab-completed with ON, so here is a 
> patch.

Hi,

the patch applies cleanly and now GRANT MAINTAIN tab-completes with ON. 
For the sake of completeness I tested a whole statement:

postgres=# GRANT M

=> postgres=# GRANT MAINTAIN

postgres=# GRANT MAINTAIN 

=> postgres=# GRANT MAINTAIN ON

postgres=# GRANT MAINTAIN ON t 

=> postgres=# GRANT MAINTAIN ON t TO

postgres=# GRANT MAINTAIN ON t TO 

=>

CURRENT_ROLE pg_monitor                   pg_use_reserved_connections
CURRENT_USER                 pg_read_all_data pg_write_all_data
pg_checkpoint                pg_read_all_settings pg_write_server_files
pg_create_subscription       pg_read_all_stats postgres
pg_database_owner            pg_read_server_files         PUBLIC
pg_execute_server_program    pg_signal_backend SESSION_USER
pg_maintain                  pg_stat_scan_tables

I've marked the CF entry as "ready for committer"

Best, Jim



Re: Tab completion for GRANT MAINTAIN

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Jim Jones  writes:
> On 18.04.23 11:08, Ken Kato wrote:
>> I found that GRANT MAINTAIN is not tab-completed with ON, so here is a 
>> patch.

> I've marked the CF entry as "ready for committer"

Yup, clearly an oversight.  Pushed.

(One could wish that it didn't take touching three or so places in
tab-complete.c to add a privilege, especially when a naive hacker might
think he was done after touching Privilege_options_of_grant_and_revoke.
I didn't see any easy way to improve that situation though.)

			regards, tom lane


Re: Tab completion for GRANT MAINTAIN

От:
Nathan Bossart <nathandbossart@gmail.com>
Дата:
On Wed, Apr 19, 2023 at 10:54:05AM -0400, Tom Lane wrote:
> (One could wish that it didn't take touching three or so places in
> tab-complete.c to add a privilege, especially when a naive hacker might
> think he was done after touching Privilege_options_of_grant_and_revoke.
> I didn't see any easy way to improve that situation though.)

Sorry, I think this was my fault.  Thanks for fixing.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com


FAQ