Re: how to create a non-inherited CHECK constraint in CREATE TABLE - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: how to create a non-inherited CHECK constraint in CREATE TABLE
Date
Msg-id 1334168971-sup-1877@alvh.no-ip.org
Whole thread Raw
In response to Re: how to create a non-inherited CHECK constraint in CREATE TABLE  (Nikhil Sontakke <nikkhils@gmail.com>)
Responses Re: how to create a non-inherited CHECK constraint in CREATE TABLE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Excerpts from Nikhil Sontakke's message of mié abr 11 15:07:45 -0300 2012:

> This patch removes the support for :
>
> ALTER TABLE ONLY constraint_rename_test ADD CONSTRAINT con2 CHECK (b > 0);
>
> and uses
>
> ALTER TABLE constraint_rename_test ADD CONSTRAINT con2 CHECK ONLY (b > 0);
>
> Is this what we want? Or we would want the earlier support in place for
> backward compatibility as well? We are actually introducing this in 9.2 so
> I guess we can remove this.

I'm not quite following that logic.  I don't think support for the
previous syntax should be removed -- does it cause some serious problem?

> This is a much cleaner implementation and we might not even need the
> changes in pg_dump now because the pg_get_constraintdef can provide the
> info about the ONLY part too. So some cleanup can be done if needed.
>
> I know it's a bit late in the commitfest, but if this patch makes this
> feature more "complete", maybe we should consider...
>
> Thoughts?

Personally I don't think we should consider this for 9.2.

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Last gasp
Next
From: Tom Lane
Date:
Subject: Re: how to create a non-inherited CHECK constraint in CREATE TABLE