[patch] psql tab completion for grant execute

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема [patch] psql tab completion for grant execute
Дата
Msg-id 8fb1c784-5082-41a9-b2ea-4da50c43225d@mm
обсуждение исходный текст
Ответы Re: [patch] psql tab completion for grant execute  (Michael Paquier <michael.paquier@gmail.com>)
Re: [patch] psql tab completion for grant execute  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
 Hi,

When tab-completing after GRANT EXECUTE, currently psql injects
"PROCEDURE", rather than the expected "ON".

The code for completing with "ON" is there, but it's not reached due to
falling earlier into another branch, one that handles CREATE TRIGGER.

A trivial patch is attached. It adds the condition that if EXECUTE is
preceded by GRANT itself preceded by nothing, then that completion
with PROCEDURE is skipped.

I've looked at fixing it more directly, by testing if the EXECUTE
is part of a CREATE TRIGGER, but it didn't seem fitting to go
looking backwards  that many words into the string (more
than the 5 words suggested by the rest of the code).

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: jsonb array-style subscripting
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: jsonb array-style subscripting