Re: delta relations in AFTER triggers

Adam Brusselback <adambrusselback@gmail.com>

From: Adam Brusselback <adambrusselback@gmail.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2016-11-02T16:41:00Z
Lists: pgsql-hackers
>
> The delete of about one million rows from a "parent" table with no
> matching rows in the "child" table, and no index on referencing
> column in the child table, took 24:17.969 using current triggers
> and 00:03.262 using the set-based triggers.  Yes, that reduces
> current run time for that case by 99.78%


That is really incredible.  Gets rid of the need for an index on
referencing columns for a ton of use cases.

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.