Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker )
To: Michael Paquier <michael@paquier.xyz>
Cc: David Fetter <david@fetter.org>, pgsql-hackers@postgresql.org
Date: 2018-10-25T11:34:29Z
Lists: 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
Commits
-
Add tab completion of EXECUTE FUNCTION for CREATE TRIGGER in psql
- fdf5eade9626 11.1 landed
- 292ef6e2778a 12.0 landed
-
Improve tab completion of CREATE EVENT TRIGGER in psql
- 5953c9969762 12.0 landed
-
Improve tab completion for ANALYZE, EXPLAIN, and VACUUM.
- 121213d9d852 12.0 cited