]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 20 Oct 2020 22:22:09 +0000 (19:22 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 20 Oct 2020 22:22:09 +0000 (19:22 -0300)
commit0e6b6f8c7192c82f62b4bbc0b40e9c6252a67bd1
tree87fe186608ae0334530b0d34989f680659dfa2e7
parentbd0677bb8a54683b05b75fc242bd5c757ce5edd8
Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion

More precisely, correctly handle the ONLY flag indicating not to
recurse.  This was implemented in 86f575948c77 by recursing in
trigger.c, but that's the wrong place; use ATSimpleRecursion instead,
which behaves properly.  However, because legacy inheritance has never
recursed in that situation, make sure to do that only for new-style
partitioning.

I noticed this problem while testing a fix for another bug in the
vicinity.

This has been wrong all along, so backpatch to 11.

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