Re: BUG #15883: Event Trigger Firing Matrix Table is incomplete
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: jeremy@musicsmith.net, pgsql-bugs@lists.postgresql.org
Date: 2019-07-28T10:45:55Z
Lists: pgsql-bugs
Hi Jeremy, On Tue, Jul 02, 2019 at 02:57:50PM +0000, PG Bug reporting form wrote: > The event trigger firing matrix table in the documentation: > https://www.postgresql.org/docs/11/event-trigger-matrix.html#EVENT-TRIGGER-BY-COMMAND-TAG > claims to list all commands for which event triggers are supported. Sorry for the late reply. > They are: > - REFRESH MATERIALIZED VIEW > - ALTER DEFAULT PRIVILEGES > - ALTER LARGE OBJECT There are more missing entries: CREATE MATERIALIZED VIEW (missing for ages) DROP MATERIALIZED VIEW (missing for ages) ALTER MATERIALIZED VIEW (missing for ages) CREATE ACCESS METHOD (down to 9.6) DROP ACCESS METHOD (down to 9.6) CREATE PROCEDURE (down to 11) DROP PROCEDURE (down to 11) CREATE PUBLICATION (down to 10) ALTER PUBLICATION (down to 10) DROP PUBLICATION (down to 10) CREATE SUBSCRIPTION (down to 10) ALTER SUBSCRIPTION (down to 10) DROP SUBSCRIPTION (down to 10) ALTER STATISTICS (down to 10) > - DROP OWNED > - IMPORT FOREIGN SCHEMA These two ones are correctly listed in the table. If you use this set of event triggers it is easy enough to check all of them: CREATE OR REPLACE FUNCTION log_any_command() RETURNS event_trigger LANGUAGE plpgsql AS $$ BEGIN RAISE NOTICE 'command % for event %', tg_tag, tg_event; END; $$; CREATE EVENT TRIGGER ddl_start ON ddl_command_start EXECUTE FUNCTION log_any_command(); CREATE EVENT TRIGGER ddl_end ON ddl_command_end EXECUTE FUNCTION log_any_command(); CREATE EVENT TRIGGER ddl_drop ON sql_drop EXECUTE FUNCTION log_any_command(); CREATE EVENT TRIGGER ddl_rewrite ON table_rewrite EXECUTE FUNCTION log_any_command(); I'll go fix all the ones I have noticed, down to where they apply, thanks! -- Michael
Commits
-
Doc: Fix event trigger firing table
- 5f2a94a38d24 9.4.24 landed
- d452d0cf6fd3 9.5.19 landed
- 484a4667bbed 9.6.15 landed
- e9ecf736e121 10.10 landed
- 0e8f927fa6bb 11.5 landed
- e396d1ee7db5 12.0 landed
- 44460d7017cd 13.0 landed