pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: tender wang <tndrwang@gmail.com>
Cc: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails
Date: Thu, 3 Aug 2023 11:02:43 +0200
Message-ID: <20230803090243.5ba3mapddthv6yhn@alvherre.pgsql> (raw)
In-Reply-To: <CAHewXNkL1QC_erA_7mkFHHAU9c56fa3oxuSvRt9cmtyZRY8Zhw@mail.gmail.com>

On 2023-Aug-03, tender wang wrote:

> I think  old "sub-FK" should not be dropped, that will be violates foreign
> key constraint.

Yeah, I've been playing more with the patch and it is definitely not
doing the right things.  Just eyeballing the contents of pg_trigger and
pg_constraint for partitions added by ALTER...ATTACH shows that the
catalog contents are inconsistent with those added by CREATE TABLE
PARTITION OF.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/





view thread (70+ messages)  latest in thread

Message-ID: <20230803090243.5ba3mapddthv6yhn@alvherre.pgsql>
Permalink:  ../20230803090243.5ba3mapddthv6yhn@alvherre.pgsql/
Also on:    postgresql.org/message-id/20230803090243.5ba3mapddthv6yhn@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, tndrwang@gmail.com, jgdr@dalibo.com
  Subject: Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails
  In-Reply-To: <20230803090243.5ba3mapddthv6yhn@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox