Re: BUG #15883: Event Trigger Firing Matrix Table is incomplete
От | Michael Paquier |
---|---|
Тема | Re: BUG #15883: Event Trigger Firing Matrix Table is incomplete |
Дата | |
Msg-id | 20190728104555.GA23790@paquier.xyz обсуждение исходный текст |
Ответ на | BUG #15883: Event Trigger Firing Matrix Table is incomplete (PG Bug reporting form <noreply@postgresql.org>) |
Ответы |
Re: BUG #15883: Event Trigger Firing Matrix Table is incomplete
|
Список | 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
Вложения
В списке pgsql-bugs по дате отправления: