From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tender Wang <tndrwang@gmail.com>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18541: Reattaching a partition referenced by a foreign key fails with an error
Date: Wed, 7 Aug 2024 18:22:39 -0400
Message-ID: <202408072222.icgykv5yrql5@alvherre.pgsql> (raw)
In-Reply-To: <CAHewXNkcJo3d9Qj00FGof9dpHg8A4W9x-XJx9EsfrS8w7M395Q@mail.gmail.com>
On 2024-Jul-15, Tender Wang wrote:
> PG Bug reporting form <noreply@postgresql.org> 于2024年7月15日周一 21:02写道:
> > The following script:
> > CREATE TABLE t1 (a int, PRIMARY KEY (a));
> > CREATE TABLE t (a int, PRIMARY KEY (a), FOREIGN KEY (a) REFERENCES t1)
> > PARTITION BY LIST (a);
> > ALTER TABLE t ATTACH PARTITION t1 FOR VALUES IN (1);
I propose to reject this with the attached patch, which I intend to
backpatch all the way down to 12.
FWIW, it's not the same problem that Jehan-Guillaume described in [1],
even though the error message being thrown is the same.
[1] https://postgr.es/m/20230705233028.2f554f73@karst
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/Attachments:
[text/x-diff] 0001-Refuse-ATTACH-of-a-table-referenced-by-a-foreign-key.patch (0B, ../202408072222.icgykv5yrql5@alvherre.pgsql/2-0001-Refuse-ATTACH-of-a-table-referenced-by-a-foreign-key.patch)
download
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-bugs@postgresql.org
Cc: alvherre@alvh.no-ip.org, tndrwang@gmail.com, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18541: Reattaching a partition referenced by a foreign key fails with an error
In-Reply-To: <202408072222.icgykv5yrql5@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