Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER - Mailing list pgsql-hackers

From ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Subject Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER
Date
Msg-id d8j5zxqp8e2.fsf@dalvik.ping.uio.no
Whole thread Raw
In response to Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:

> +   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. 

The * is a wildcard, so it completes EXECUTE after CREATE TRIGGER … WHEN
(<condition>), which is perfectly valid.  Using * in the middle of an
alternative is a fairly new feature, added by Tom a month ago in commit
121213d9d8527f880f153e4a032ee1a4cd43833f.

- ilmari
-- 
"I use RMS as a guide in the same way that a boat captain would use
 a lighthouse.  It's good to know where it is, but you generally
 don't want to find yourself in the same spot." - Tollef Fog Heen


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER
Next
From: Michael Paquier
Date:
Subject: Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER