postgresql/src
Alvaro Herrera b75ccddcd6 Fix SET CONSTRAINTS .. DEFERRED on partitioned tables
SET CONSTRAINTS ... DEFERRED failed on partitioned tables, because of a
sanity check that ensures that the affected constraints have triggers.
On partitioned tables, the triggers are in the leaf partitions, not in
the partitioned relations themselves, so the sanity check fails.
Removing the sanity check solves the problem, because the code needed to
support the case is already there.

Backpatch to 11.

Note: deferred unique constraints are not affected by this bug, because
they do have triggers in the parent partitioned table.  I did not add a
test for this scenario.

Discussion: https://postgr.es/m/20191105212915.GA11324@alvherre.pgsql
2019-11-07 13:59:24 -03:00
..
backend Fix SET CONSTRAINTS .. DEFERRED on partitioned tables 2019-11-07 13:59:24 -03:00
bin Fix integer-overflow edge case detection in interval_mul and pgbench. 2019-11-07 11:22:59 -05:00
common In pg_log_generic(), be more paranoid about preserving errno. 2019-07-06 11:25:48 -04:00
fe_utils Fix parallel restore of FKs to partitioned tables 2019-10-17 09:58:01 +02:00
include Fix integer-overflow edge case detection in interval_mul and pgbench. 2019-11-07 11:22:59 -05:00
interfaces Get rid of useless/dangerous redefinition of bool in ECPG. 2019-10-25 12:17:41 -04:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
pl Translation updates 2019-09-29 23:57:17 +02:00
port Deal with yet another issue related to "Norwegian (Bokmål)" locale. 2019-10-21 14:18:16 -04:00
template Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
test Fix SET CONSTRAINTS .. DEFERRED on partitioned tables 2019-11-07 13:59:24 -03:00
timezone Update time zone data files to tzdata release 2019c. 2019-09-20 19:53:52 -04:00
tools Handle spaces in OpenSSL install location for MSVC 2019-10-04 15:39:27 -04:00
tutorial Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:05:50 +02:00