From: Andrew Gierth <rhodiumtoad@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix transition tables for ON CONFLICT.
Date: Wed, 28 Jun 2017 18:18:17 +0000
Message-ID: <E1dQHXd-0007re-0X@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Fix transition tables for ON CONFLICT.
We now disallow having triggers with both transition tables and ON
INSERT OR UPDATE (which was a PG extension to the spec anyway),
because in this case it's not at all clear how the transition tables
should work for an INSERT ... ON CONFLICT query. Separate ON INSERT
and ON UPDATE triggers with transition tables are allowed, and the
transition tables for these reflect only the inserted and only the
updated tuples respectively.
Patch by Thomas Munro
Discussion: https://postgr.es/m/CAEepm%3D11KHQ0JmETJQihSvhZB5mUZL2xrqHeXbCeLhDiqQ39%3Dw%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8c55244ae379822d8bf62f6db0b5b1f7637eea3a
Modified Files
--------------
src/backend/commands/trigger.c | 58 ++++++++++++++++++++++++++++++----
src/include/commands/trigger.h | 14 ++++++--
src/test/regress/expected/plpgsql.out | 9 ++++--
src/test/regress/expected/triggers.out | 38 ++++++++++++++++++++++
src/test/regress/sql/plpgsql.sql | 10 ++++--
src/test/regress/sql/triggers.sql | 39 +++++++++++++++++++++++
6 files changed, 155 insertions(+), 13 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: rhodiumtoad@postgresql.org
Subject: Re: pgsql: Fix transition tables for ON CONFLICT.
In-Reply-To: <E1dQHXd-0007re-0X@gemulon.postgresql.org>
References: <E1dQHXd-0007re-0X@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox