On Wed, May 10, 2017 at 3:55 PM, Robert Haas <robertmh...@gmail.com> wrote:
> On Tue, May 9, 2017 at 11:48 PM, Thomas Munro
> <thomas.mu...@enterprisedb.com> wrote:
>> Hmm.  DB2 has transition tables (invented them maybe?) and it allows
>> OLD/NEW TABLE on row-level triggers:
>>
>> https://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.1.0/com.ibm.db2.luw.admin.dbobj.doc/doc/t0020236.html
>
> Yeah, my impression is that Kevin was pretty keen on supporting that
> case.  I couldn't say exactly why, though.

Ok, here's a new version that handles row-level triggers with
transition tables on any child table.  The regression tests show
partition and inheritance examples of that.  To be clear about what
this does:

1.  If you attach a row-level trigger with transition tables to any
partition, it will see transition tuples from all partitions that were
modified by the same statement.

2.  If you attach a row-level trigger with transition tables to any
inheritance child, it will see transition tuples from all tables in
the inheritance hierarchy at or below the directly named table that
were modified by the same statement, sliced so that they appear as
tuples from the directly named table.

On Wed, May 10, 2017 at 3:41 PM, Robert Haas <robertmh...@gmail.com> wrote:
> Hmm.  What if the partitioning hierarchy contains foreign tables?

Arghalalkjhsdflg.  Looking into that...

-- 
Thomas Munro
http://www.enterprisedb.com

Attachment: transition-tuples-from-child-tables-v3.patch
Description: Binary data

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to