Re: Fix foreign key constraint check for partitioned tables
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Hadi Moshayedi <hadi@moshayedi.net>
Cc: Edmund Horner <ejrh00@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-04-06T19:27:47Z
Lists: pgsql-hackers
Hadi Moshayedi <hadi@moshayedi.net> writes: > [ fix-foreign-key-check.patch ] Pushed with some adjustments, as discussed over at https://postgr.es/m/19030.1554574075@sss.pgh.pa.us > This patch also changed the output of some of tests, i.e. previously > foreign key constraint failures errored on the partitioned table itself, > but now it shows the child table's name in the error message. I hope it is > ok. Yeah, I think that's OK. Interestingly, no such changes appear in HEAD's version of the regression test --- probably Alvaro's earlier changes had the same effect. > I also added a regression test which would fail without this patch. This needed a fair amount of work. You shouldn't have summarily dropped a table that the test script specifically says it meant to leave around, and we have a convention that role names created by the regression test scripts always should begin with "regress_", and you didn't clean up the role at the end (which would lead to failures in repeated installcheck runs). regards, tom lane
Commits
-
Fix failures in validateForeignKeyConstraint's slow path.
- c2a5fb33d104 11.3 landed
- 46e3442c9ec8 12.0 landed