[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: pgsql-hackers@postgresql.org
Date: 2018-10-23T11:26:35Z
Lists: pgsql-hackers

Attachments

Hi hackers,

The last-minute change for CREATE (EVENT) TRIGGER to accept EXECUTE
FUNCTION as well as EXECUTE PROCEDURE did not update the tab completion
in psql to match.  Please find attached two patches that do this for
CREATE TRIGGER and CREATE EVENT TRIGGER, respectively.

To keep the duplication minimal, I've changed it from completing EXECUTE
PROCEDURE as a single thing to just EXECUTE, and then completing
FUNCTION or FUNCTION and PROCEDURE after that depending on the server
version.

- ilmari
-- 
- Twitter seems more influential [than blogs] in the 'gets reported in
  the mainstream press' sense at least.               - Matt McLeod
- That'd be because the content of a tweet is easier to condense down
  to a mainstream media article.                      - Calle Dybedahl

Commits

  1. Add tab completion of EXECUTE FUNCTION for CREATE TRIGGER in psql

  2. Improve tab completion of CREATE EVENT TRIGGER in psql

  3. Improve tab completion for ANALYZE, EXPLAIN, and VACUUM.