]> granicus.if.org Git - postgresql/commit
Implement syntax for transition tables in AFTER triggers.
authorKevin Grittner <kgrittn@postgresql.org>
Fri, 4 Nov 2016 15:49:50 +0000 (10:49 -0500)
committerKevin Grittner <kgrittn@postgresql.org>
Fri, 4 Nov 2016 15:49:50 +0000 (10:49 -0500)
commit8c48375e5f43ebd832f93c9166d1fe0e639ff806
tree5115baa716b278c4dcabcf6b22fd446a17eb36d8
parent69d590fffbdcfb50a31a8c78ce87e602002a869f
Implement syntax for transition tables in AFTER triggers.

This is infrastructure for the complete SQL standard feature.  No
support is included at this point for execution nodes or PLs.  The
intent is to add that soon.

As this patch leaves things, standard syntax can create tuplestores
to contain old and/or new versions of rows affected by a statement.
References to these tuplestores are in the TriggerData structure.
C triggers can access the tuplestores directly, so they are usable,
but they cannot yet be referenced within a SQL statement.
16 files changed:
doc/src/sgml/catalogs.sgml
doc/src/sgml/ref/create_trigger.sgml
src/backend/commands/tablecmds.c
src/backend/commands/trigger.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/parser/gram.y
src/backend/utils/adt/ruleutils.c
src/include/catalog/catversion.h
src/include/catalog/pg_trigger.h
src/include/commands/trigger.h
src/include/nodes/nodes.h
src/include/nodes/parsenodes.h
src/include/parser/kwlist.h
src/include/utils/reltrigger.h