PostgreSQL: Documentation: 16: 39.1. Overview of Trigger Behavior
A trigger is a specification that the database should automatically execute a particular function whenever a certain type of operation is performed. Triggers can be attached to tables (partitioned or not), views, and foreign tables. On tables and foreign tables, triggers can be defined to execute either before or after any INSERT, UPDATE, or DELETE operation, either once per modified row, or once per SQL statement. UPDATE triggers can moreover be set to fire only if certain columns are mentioned in the SET clause of the UPDATE statement. Triggers can also fire for TRUNCATE statements. If a trigger event occurs, the trigger's function is called at the appropriate time to handle the event. On views, triggers can be defined to execute instead of INSERT, UPDATE, or DELETE operations. Such INSTEAD OF triggers are fired once for each row that needs to be modified in the view. It is the responsibility of the trigger's function to perform the necessary modifications to the view's underlying ba
PostgreSQL: Documentation: 18: 37.1. Overview of Trigger Behavior July 16, 2026: PostgreSQL 19 Beta 2 Released! Documentation → PostgreSQL 18 Supported Versions: Current ( 18 ) / 17 / 16 / 15 / 14 Development Versions: 19 / devel Unsupported versions: 13 / 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 37.1. Overview of Trigger Behavior Prev Up Chapter 37. Triggers Home Next 37.1. Overview of Trigger Behavior # A trigger is a specification that the database should automatically execute a particular function whenever a certain type of operation is performed. Trigg
related reading
- The only scalable delete in Postgres is DROP TABLE — PlanetScaleplanetscale.com
- Is a PostgreSQL trigger asynchronous? - Stack Overflowstackoverflow.com
- Postgresql tricks | Lanre Adelowolanre.wtf
- PostgreSQL: Documentation: 18: 54.1. Overviewpostgresql.org
- you won't forget how postgres works after thisyoutube.com
- Nine ways to shoot yourself in the foot with PostgreSQLphilbooth.me
- Row Level Security | Supabase Docssupabase.com
- PostgreSQL rocks, except when it blocks: Understanding locks - Citus Datacitusdata.com
- PostgreSQL: Documentation: 18: REFRESH MATERIALIZED VIEWpostgresql.org
- postgresql - How can I ensure that a materialized view is always up to date? - Stack Overflowstackoverflow.com
- Getting started with Airtable automationssupport.airtable.com
- PostgreSQL: Documentation: 18: 13.2. Transaction Isolationpostgresql.org