From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fire per-statement triggers on partitioned tables.
Date: Mon, 01 May 2017 12:29:15 +0000
Message-ID: <E1d5AS3-0004Cx-Np@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Fire per-statement triggers on partitioned tables.
Even though no actual tuples are ever inserted into a partitioned
table (the actual tuples are in the partitions, not the partitioned
table itself), we still need to have a ResultRelInfo for the
partitioned table, or per-statement triggers won't get fired.
Amit Langote, per a report from Rajkumar Raghuwanshi. Reviewed by me.
Discussion: http://postgr.es/m/CAKcux6%3DwYospCRY2J4XEFuVy0L41S%3Dfic7rmkbsU-GXhhSbmBg%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e180c8aa8caf5c55a273d4a8e6092e77ff3cff10
Modified Files
--------------
doc/src/sgml/trigger.sgml | 19 ++++----
src/backend/executor/execMain.c | 55 ++++++++++++++++++++--
src/backend/executor/nodeModifyTable.c | 42 +++++++++++++----
src/backend/nodes/copyfuncs.c | 2 +
src/backend/nodes/outfuncs.c | 3 ++
src/backend/nodes/readfuncs.c | 2 +
src/backend/optimizer/plan/createplan.c | 1 +
src/backend/optimizer/plan/planner.c | 3 ++
src/backend/optimizer/plan/setrefs.c | 19 ++++++--
src/include/nodes/execnodes.h | 12 +++++
src/include/nodes/plannodes.h | 13 +++++-
src/include/nodes/relation.h | 1 +
src/test/regress/expected/triggers.out | 81 +++++++++++++++++++++++++++++++++
src/test/regress/sql/triggers.sql | 70 ++++++++++++++++++++++++++++
14 files changed, 296 insertions(+), 27 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: rhaas@postgresql.org
Subject: Re: pgsql: Fire per-statement triggers on partitioned tables.
In-Reply-To: <E1d5AS3-0004Cx-Np@gemulon.postgresql.org>
References: <E1d5AS3-0004Cx-Np@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