]> granicus.if.org Git - postgresql/commit
Fire per-statement triggers on partitioned tables.
authorRobert Haas <rhaas@postgresql.org>
Mon, 1 May 2017 12:23:01 +0000 (08:23 -0400)
committerRobert Haas <rhaas@postgresql.org>
Mon, 1 May 2017 12:23:01 +0000 (08:23 -0400)
commite180c8aa8caf5c55a273d4a8e6092e77ff3cff10
treedb85b867105969b352fdd95ac83d506fae3f8e04
parente18b2c480da478f62781e06488cda56fe1b4e919
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
14 files changed:
doc/src/sgml/trigger.sgml
src/backend/executor/execMain.c
src/backend/executor/nodeModifyTable.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/setrefs.c
src/include/nodes/execnodes.h
src/include/nodes/plannodes.h
src/include/nodes/relation.h
src/test/regress/expected/triggers.out
src/test/regress/sql/triggers.sql