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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Cc: David Fetter <david(at)fetter(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER
Date: 2018-10-25 03:42:37
Message-ID: 20181025034237.GF5902@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-10-25 03:43:04 A small tweak to some comments for PartitionKeyData
Previous Message Bruno Wolff III 2018-10-25 02:41:44 Re: Should pg 11 use a lot more memory building an spgist index?