Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER
Дата
Msg-id 20181025034237.GF5902@paquier.xyz
обсуждение исходный текст
Ответ на Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
Ответы Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
Список pgsql-hackers
On Wed, Oct 24, 2018 at 10:36:41AM +0100, Dagfinn Ilmari Mannsåker wrote:
> Fair point. I was unsure about whether to complete every supported
> variant or just the new one.  Updated patches attached.

One problem with this approach is that a user needs to use twice tab.
The first time is to show "EXECUTE", and the second time is to show
automatically "PROCEDURE" or "FUNCTION" automatically.  The patch as it
stands is less complicated, but I can imagine as well that what's
propose could confuse people into thinking that they need to type
something after EXECUTE has showed up on the prompt.  I vote for
simplicity and there are other code paths where completion for one
element only is done.  Any objections?

+   else if (HeadMatches("CREATE", "TRIGGER") && TailMatches("WHEN", "(*)"))
+       COMPLETE_WITH("EXECUTE");

It seems to me that this should be removed, it would fail at parsing if
completed.
--
Michael

Вложения

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

Предыдущее
От: Chapman Flack
Дата:
Сообщение: Re: Re: Question about xmloption and pg_restore
Следующее
От: David Rowley
Дата:
Сообщение: A small tweak to some comments for PartitionKeyData