Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails

Tender Wang <tndrwang@gmail.com>

From: Tender Wang <tndrwang@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Alexander Lakhin <exclusion@gmail.com>
Date: 2024-07-23T02:15:47Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> 于2024年7月19日周五 21:18写道:

>
> I find this pair of queries useful; they show which constraints exist
> and which triggers belong to each.  We need to make the constraints and
> triggers match after a detach right as things would be if the
> just-detached partition were an individual table having the same foreign
> key.
>

I don't find the useful queries in your last email. Can you provide them.
Thanks.


-- 
Tender Wang

Commits

  1. Fix some more bugs in foreign keys connecting partitioned tables

  2. Restructure foreign key handling code for ATTACH/DETACH

  3. Create foreign key triggers in partitioned tables too