]> granicus.if.org Git - postgresql/commit
Don't clone internal triggers to partitions
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 3 Apr 2018 22:01:34 +0000 (19:01 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 3 Apr 2018 22:08:25 +0000 (19:08 -0300)
commit851f4b4e143063719553bccc73119a0d29fb1afc
treefc9d6007a5702044ca03996b6c0c1e4e7d35468a
parent2b3031559a607833e4e265bb9726d52f398661e0
Don't clone internal triggers to partitions

Trigger cloning to partitions was supposed to occur for user-visible
triggers only, but during development the protection that prevented it
from occurring to internal triggers was lost.  Reinstate it, as well as
add a test case to ensure internal triggers (in the tested case,
triggers implementing a deferred unique constraint) are not cloned.
Without the code fix, the partitions in the test end up with different
numbers of triggers, which is clearly wrong ...

Bug in 86f575948c77.

Discussion: https://postgr.es/m/20180403214903.ozfagwjcpk337uw7@alvherre.pgsql
src/backend/commands/tablecmds.c
src/test/regress/expected/triggers.out
src/test/regress/sql/triggers.sql