postgresql_16:6.6.10 Trigger Functions
PostgreSQL 16 > Server Programming > PL/pgSQL — SQL Procedural Language > Trigger Functions
PL/pgSQL can be used to define trigger functions on data changes or database events. A trigger function is created with the CREATE FUNCTION command, declaring it as a function with no arguments and a return type of trigger (for data change triggers) or event_trigger (for database event triggers). Special local variables named TG_*something* are automatically defined to describe the condition that triggered the call.
Subsections
- postgresql_16:6.6.10.1 Triggers on Data Changes
- postgresql_16:6.6.10.2 Triggers on Events