Обсуждение: pgsql: Add tg_updatedcols to TriggerData

Поиск
Список
Период
Сортировка

pgsql: Add tg_updatedcols to TriggerData

От
Peter Eisentraut
Дата:
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/71d60e2aa05157efec28393b15c0b0b9fc1b210c

Modified Files
--------------
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(-)