Re: Fix foreign key constraint check for partitioned tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hadi Moshayedi <hadi(at)moshayedi(dot)net>
Cc: Edmund Horner <ejrh00(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix foreign key constraint check for partitioned tables
Date: 2019-04-06 19:27:47
Message-ID: 13547.1554578867@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hadi Moshayedi <hadi(at)moshayedi(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-04-06 20:27:59 Back-branch bugs with fully-prunable UPDATEs
Previous Message Pavel Stehule 2019-04-06 19:24:36 Re: ToDo: show size of partitioned table