pg.ddx.io  pgsql-bugs@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: 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 14:50:50 -0400
Message-ID: <202408071850.g7wjetpfbloe@alvherre.pgsql> (raw)
In-Reply-To: <202408071844.d7mzelswgpdu@alvherre.pgsql>

On 2024-Aug-07, Alvaro Herrera wrote:

> I think this schema is nuts.  Do you have a practical use for something
> like this?

FWIW if you try to set this up the other way around, you get a different
error:

create table t (a int primary key) partition by list (a);
create table t1 partition of t for values in (1);
alter table t add foreign key (a) references t1;
ERROR:  cannot ALTER TABLE "t1" because it is being used by active queries in this session

so I'm not bothered by the restriction in functionality.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/





view thread (7+ messages)  latest in thread

Message-ID: <202408071850.g7wjetpfbloe@alvherre.pgsql>
Permalink:  ../202408071850.g7wjetpfbloe@alvherre.pgsql/
Also on:    postgresql.org/message-id/202408071850.g7wjetpfbloe@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-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: <202408071850.g7wjetpfbloe@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