Michael Paquier <mich...@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