Add tg_updatedcols to TriggerData
Peter Eisentraut <peter@eisentraut.org>
Add tg_updatedcols to TriggerData This allows a trigger function to determine for an UPDATE trigger which columns were actually updated. This allows some optimizations in generic trigger functions such as lo_manage and tsvector_update_trigger. Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://www.postgresql.org/message-id/flat/11c5f156-67a9-0fb5-8200-2a8018eb2e0c@2ndquadrant.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/lo/expected/lo.out | modified | +8 −0 |
| contrib/lo/lo.c | modified | +2 −1 |
| contrib/lo/sql/lo.sql | modified | +5 −0 |
| doc/src/sgml/trigger.sgml | modified | +25 −0 |
| src/backend/commands/trigger.c | modified | +6 −0 |
| src/backend/utils/adt/tsvector_op.c | modified | +21 −8 |
| src/include/commands/trigger.h | modified | +1 −0 |
Documentation touched
Discussion
- allow trigger to get updated columns 5 messages · 2020-02-24 → 2025-01-22