postgresql/src
Alvaro Herrera 123cc697a8 Create action triggers when partitions are detached
Detaching a partition from a partitioned table that's constrained by
foreign keys requires additional action triggers on the referenced side;
otherwise, DELETE/UPDATE actions there fail to notice rows in the table
that was partition, and so are incorrectly allowed through.  With this
commit, those triggers are now created.  Conversely, when a table that
has a foreign key is attached as a partition to a table that also has
the same foreign key, those action triggers are no longer needed, so we
remove them.

Add a minimal test case verifying (part of) this.

Authors: Amit Langote, Álvaro Herrera
Discussion: https://postgr.es/m/f2b8ead5-4131-d5a8-8016-2ea0a31250af@lab.ntt.co.jp
2019-01-21 19:59:07 -03:00
..
backend Create action triggers when partitions are detached 2019-01-21 19:59:07 -03:00
bin Revert "Fix under-quoted filename pattern in pgbench TAP test." 2019-01-21 11:29:54 -05:00
common Fix portability failure introduced in commits d2b0b60e7 et al. 2018-12-26 15:30:22 -05:00
fe_utils Fix translation of special characters in psql's LaTeX output modes. 2018-11-26 17:32:51 -05:00
include Use our own getopt() on OpenBSD. 2019-01-18 15:06:26 -05:00
interfaces Second try at fixing numeric data passed through an ECPG SQLDA. 2018-11-14 11:27:30 -05:00
makefiles Process EXTRA_INSTALL serially, during the first temp-install. 2018-12-31 13:55:01 -08:00
pl Update docs & tests to reflect that unassigned OLD/NEW are now NULL. 2019-01-09 11:35:14 -05:00
port Use our own getopt() on OpenBSD. 2019-01-18 15:06:26 -05:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Create action triggers when partitions are detached 2019-01-21 19:59:07 -03:00
timezone Sync our copy of the timezone library with IANA release tzcode2018g. 2018-10-31 09:48:04 -04:00
tools Revert "Add valgrind suppressions for wcsrtombs optimizations" 2019-01-19 20:48:02 +01:00
tutorial
.gitignore
DEVELOPERS
Makefile
Makefile.global.in fix typo 2019-01-13 16:43:55 -05: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