Event triggers
Database-wide triggers on DDL and session events (ddl_command_start/end, sql_drop, table_rewrite, login) and their introspection functions. Introduced in PostgreSQL 9.3.
Versions
- PostgreSQL 20 · worked-on · improved · moderate
- PostgreSQL 19 · shipped · improved · moderate · 2 commits · +223 / -14 lines
- PostgreSQL 18 · worked-on · improved · moderate
- PostgreSQL 17 · shipped · improved · moderate · 8 commits · +1.1k / -106 lines
- PostgreSQL 16 · worked-on · improved · moderate
- PostgreSQL 15 · worked-on · improved · moderate
- PostgreSQL 14 · worked-on · improved · moderate
Threads
- Event triggers and the commands embedded in CREATE SCHEMA
- Fire event triggers for relations created by EXPLAIN ANALYZE (CTAS, SELECT INTO, MAT VIEW)
- Event trigger table rewrite doc missing ALTER MATERIALIZED VIEW case
- PL/pgSQL: FOUND is NULL, not false, in event trigger functions
- BUG #19488: Standby connection fails after dropping on login event trigger enabled always
- table_rewrite event trigger can corrupt rows by inserting into the table being rewritten (20devel)
- Collect ALTER PUBLICATION commands for event triggers
- Uninitialized heap memory returned by pg_event_trigger_table_rewrite_reason()
- UBSAN crash in EventTriggerCollectAlterTSConfig (memcpy with NULL src)
- Funny behavior in event trigger code with CREATE OR REPLACE VIEW and column additions
- Error with DEFAULT VALUE in temp table
- event trigger support for PL/Python
- test_ddl_deparse: Rename test create_sequence_1
- Should TRUNCATE fire DDL triggers
- Allow database owners to CREATE EVENT TRIGGER
- doc issues in event-trigger-matrix.html
- Table rewrite supporting functions for event triggers
- BUG #18570: Drop event trigger for DDL finishes successfully but trigger still executed on DDL
- PL/python event_trigger
- Is missing LOGIN Event on Trigger Firing Matrix ?
- Proposal for CREATE OR REPLACE EVENT TRIGGER in PostgreSQL
- Support event trigger for logoff
- Typo about the SetDatatabaseHasLoginEventTriggers?
- small_cleanups around login event triggers
- pgsql: Add support event triggers on authenticated login
- On login trigger: take three
- Incorrect grammar on ALTER EVENT TRIGGER
- PATCH: Add REINDEX tag to event triggers
- Avoid race condition for event_triggers regress test
- event trigger sgml touch-up
- GUC for temporarily disabling event triggers
- Looking for context around which event triggers are permitted
- evtcache: EventTriggerCache vs Event Trigger Cache
- Materialized view rewrite is broken when there is an event trigger
- BUG #17576: Event_trigger ddl_command_end not firing during CREATE PROCEDURE
- Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger
- Implicitly created operator family not listed by pg_event_trigger_ddl_commands
- deparsing utility commands
- Missing tags ALTER ROUTINE and DROP ROUTINE in Event Trigger Firing Matrix
- Bogus NULL object_name from pg_event_trigger_dropped_objects()
- Error in sample on doc page
- Non-superuser event trigger owners
- create event trigger docs
- Documentation disagrees with behavior of ALTER EVENT TRIGGER
- Fix dropped object handling in pg_event_trigger_ddl_commands
- pg_identify_object_as_address() doesn't support pg_event_trigger oids
- pg_event_trigger_ddl_commands fails with cache lookup failed
- Use-after-free in 12- EventTriggerAlterTableEnd
- [BUG v13] Crash with event trigger in extension
- DROP and ddl_command_end.
- Bug in pg_restore with EventTrigger in parallel mode
- BUG #16266: Server crash on SELECT event_trigger-returning function
- New feature proposal (trigger)
- BUG #16177: pg_event_trigger_ddl_commands() returns empty set for ddl_command_start and "drop table"
- Hooks for session start and end, take two
- 39.2. Event Trigger Firing Matrix - add note
- Re: How to install login_hook in Postgres 10.5
- BUG #15883: Event Trigger Firing Matrix Table is incomplete
- Function like "pg_trigger_depth" for Event Triggers
- pgsql: Fix event triggers for partitioned tables
- BUG #15359: event_trigger via pg_event_trigger_ddl_commands() not returning "CREATE SEQUENCE" command
- Get funcid when create function
- Error bundling script file with extension when event trigger commands are used
- BUG #14815: event trigger in extension
- Is it possible to get query_string value in an event trigger?
- New Event Trigger: table_rewrite
- Add CREATE support to event triggers
- Completing PL support for Event Triggers
- Event Triggers: adding information
- Command Triggers