aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/relcache.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2019-01-21 19:59:07 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2019-01-21 19:59:07 -0300
commit123cc697a8eb0827e82ceea3f6da55b2f05eb422 (patch)
treefbf84077cd02905b0973bb0d17976733dc3b3f8c /src/backend/utils/cache/relcache.c
parenta7474308ceafb6d73730507165f45ffdbd5429c8 (diff)
downloadpostgresql-123cc697a8eb0827e82ceea3f6da55b2f05eb422.tar.gz
postgresql-123cc697a8eb0827e82ceea3f6da55b2f05eb422.zip
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
Diffstat (limited to 'src/backend/utils/cache/relcache.c')
0 files changed, 0 insertions, 0 deletions