Re: delta relations in AFTER triggers

Craig Ringer <craig.ringer@2ndquadrant.com>

From: Craig Ringer <craig.ringer@2ndquadrant.com>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Amit Khandekar <amit.khandekar@enterprisedb.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, Kevin Grittner <kgrittn@ymail.com>, Michael Paquier <michael.paquier@gmail.com>, Heikki Linnakangas <hlinnakangas@vmware.com>, Kevin Grittner <kgrittn@gmail.com>, David Fetter <david@fetter.org>, Robert Haas <robertmhaas@gmail.com>
Date: 2016-12-18T02:29:51Z
Lists: pgsql-hackers
On 22 Nov. 2016 03:01, "Thomas Munro" <thomas.munro@enterprisedb.com> wrote:


 How about a QueryEnvironment (as shown in the
patch I posted) that contains a list of NamedTuplestore pointers (the
SpiRelation struct in the patch I posted, renamed) and in future
perhaps lists of other ephemeral/transient objects that we want to
expose to SQL?


Very good idea. Sooner or later someone will probably want query-scoped
variables like MS-SQL and MySQL for example.

Commits

  1. Don't permit transition tables with TRUNCATE triggers.

  2. Pass EXEC_FLAG_REWIND when initializing a tuplestore scan.

  3. Faster expression evaluation and targetlist projection.

  4. Remove obsoleted code relating to targetlist SRF evaluation.

  5. Implement syntax for transition tables in AFTER triggers.