| From: | ilmari(at)ilmari(dot)org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz> |
| 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 11:34:29 |
| Message-ID: | d8j5zxqp8e2.fsf@dalvik.ping.uio.no |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Michael Paquier <michael(at)paquier(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2018-10-25 11:39:09 | Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER |
| Previous Message | Tom Lane | 2018-10-25 11:32:37 | Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER |