pgsql: Implement syntax for transition tables in AFTER triggers.

From: Kevin Grittner <kgrittn(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Implement syntax for transition tables in AFTER triggers.
Date: 2016-11-04 15:57:28
Message-ID: E1c2grw-00022u-Gf@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8c48375e5f43ebd832f93c9166d1fe0e639ff806

Modified Files
--------------
doc/src/sgml/catalogs.sgml | 16 ++
doc/src/sgml/ref/create_trigger.sgml | 94 ++++++++--
src/backend/commands/tablecmds.c | 5 +-
src/backend/commands/trigger.c | 327 +++++++++++++++++++++++++++++++++--
src/backend/nodes/copyfuncs.c | 16 ++
src/backend/nodes/equalfuncs.c | 14 ++
src/backend/nodes/outfuncs.c | 13 ++
src/backend/parser/gram.y | 70 +++++++-
src/backend/utils/adt/ruleutils.c | 23 +++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_trigger.h | 13 +-
src/include/commands/trigger.h | 2 +
src/include/nodes/nodes.h | 1 +
src/include/nodes/parsenodes.h | 17 ++
src/include/parser/kwlist.h | 3 +
src/include/utils/reltrigger.h | 7 +
16 files changed, 580 insertions(+), 43 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Kevin Grittner 2016-11-04 16:03:37 pgsql: Improve tab completion for CREATE TRIGGER.
Previous Message Tom Lane 2016-11-04 14:44:47 pgsql: Sync our copy of the timezone library with IANA tzcode master.