Add tg_updatedcols to TriggerData

Enterprise / PostgreSQL - Peter Eisentraut [eisentraut.org] - 9 March 2020 08:34 UTC

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.

71d60e2aa0 Add tg_updatedcols to TriggerData
contrib/lo/expected/lo.out | 8 ++++++++
contrib/lo/lo.c | 3 ++-
contrib/lo/sql/lo.sql | 5 +++++
doc/src/sgml/trigger.sgml | 25 +++++++++++++++++++++++++
src/backend/commands/trigger.c | 6 ++++++
src/backend/utils/adt/tsvector_op.c | 29 +++++++++++++++++++++--------
src/include/commands/trigger.h | 1 +
7 files changed, 68 insertions(+), 9 deletions(-)

Upstream: git.postgresql.org


  • Share