From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jesper Pedersen <jesper.pedersen@redhat.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT
Date: Mon, 21 Jan 2019 13:29:44 -0300
Message-ID: <201901211629.gu3plkjjqefw@alvherre.pgsql> (raw)
In-Reply-To: <24217a8f-5f9b-8bcc-1698-ff38921addee@lab.ntt.co.jp>
On 2019-Jan-21, Amit Langote wrote:
> Sorry about the noise. I agree with the committed approach.
Great, thanks for checking.
> With this,
> ALTER TABLE ADD FOREIGN KEY's inheritance recursion path now looks
> completely different from ALTER TABLE ADD CHECK's, but that's fine.
> Actually, if we had the same "clone" approach for check constraints, which
> both checks if a child already has the constraint being cloned and creates
> one if not, we could do away with errors like the following:
>
> create table p (a int, constraint check_a check (a > 0)) partition by list
> create table p1 (a int);
> alter table p attach partition p1 for values in (1);
> ERROR: child table is missing constraint "check_a"
>
> But of course that would be a different feature.
Heh, I wasn't aware that this failed in this silly way. But yeah,
that's a different feature and we would certainly not backpatch a fix
for it.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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@2ndquadrant.com, Langote_Amit_f8@lab.ntt.co.jp, tgl@sss.pgh.pa.us, jesper.pedersen@redhat.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT
In-Reply-To: <201901211629.gu3plkjjqefw@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