Fix transition tables for partition/inheritance.
authorAndrew Gierth <rhodiumtoad@postgresql.org>
Wed, 28 Jun 2017 17:55:03 +0000 (18:55 +0100)
committerAndrew Gierth <rhodiumtoad@postgresql.org>
Wed, 28 Jun 2017 17:55:03 +0000 (18:55 +0100)
commit501ed02cf6f4f60c3357775eb07578aebc912d3a
tree6811c9e9181dfff5ae384b9ec69994de2b777a2b
parent99255d73c07c89b69be028a1a7b8027a78befed4
Fix transition tables for partition/inheritance.

We disallow row-level triggers with transition tables on child tables.
Transition tables for triggers on the parent table contain only those
columns present in the parent.  (We can't mix tuple formats in a
single transition table.)

Patch by Thomas Munro

Discussion: https://postgr.es/m/CA%2BTgmoZzTBBAsEUh4MazAN7ga%3D8SsMC-Knp-6cetts9yNZUCcg%40mail.gmail.com
13 files changed:
doc/src/sgml/ref/create_trigger.sgml
src/backend/catalog/pg_inherits.c
src/backend/commands/copy.c
src/backend/commands/tablecmds.c
src/backend/commands/trigger.c
src/backend/executor/execMain.c
src/backend/executor/execReplication.c
src/backend/executor/nodeModifyTable.c
src/include/catalog/pg_inherits_fn.h
src/include/commands/trigger.h
src/include/nodes/execnodes.h
src/test/regress/expected/triggers.out
src/test/regress/sql/triggers.sql