Re: Another FK violation when referencing a multi-level partitioned table

Jehan-Guillaume de Rorthais <jgdr@dalibo.com>

From: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, pgsql-bugs@lists.postgresql.org
Date: 2020-02-10T10:34:39Z
Lists: pgsql-bugs

Attachments

Hello,
On Sun, 09 Feb 2020 12:48:49 -0500
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > On 2020-Feb-06, Jehan-Guillaume de Rorthais wrote:  
> >> Please, find in attachment a proposal patch to fix this FK violation.  
> 
> > You fix looks correct to me, so pushed.  I took a minute to apply some
> > minor corrections to the comments, too.  
> 
> FWIW, I think the test query is too smart for its own good:
> [...]

Indeed, thank you. Please find in attachment a patch making the test simpler.

Regards,

Commits

  1. Simplify FK-to-partitioned regression test query

  2. Fix failure to create FKs correctly in partitions