Add tg_updatedcols to TriggerData

Peter Eisentraut <peter@eisentraut.org>

Commit: 71d60e2aa05157efec28393b15c0b0b9fc1b210c
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2020-03-09T08:34:55Z
Releases: 13.0
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

PathChange+/−
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