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

From Robert Haas
Subject Re: how to create a non-inherited CHECK constraint in CREATE TABLE
Date
Msg-id CA+Tgmoa7REVzj+oYmVuKz+H7PH7C8BmQ9ujMC6sD859bi8KqKw@mail.gmail.com
Whole thread Raw
In response to Re: how to create a non-inherited CHECK constraint in CREATE TABLE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: how to create a non-inherited CHECK constraint in CREATE TABLE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Apr 11, 2012 at 2:45 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> 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);
>>>
>>> I know it's a bit late in the commitfest, but if this patch makes this
>>> feature more "complete", maybe we should consider...
>
>> Personally I don't think we should consider this for 9.2.
>
> Well, if we're going to regret having offered the other syntax, now
> would be the time to figure that out, before we ship it not after.
> I would go so far as to say that if we don't accept this for 9.2
> we probably shouldn't accept it at all, because two different ways
> to spell the same thing isn't nice.

+1 for fixing up the syntax before 9.2 goes out the door.  I think the
original syntax was misguided to begin with.

CHECK NO INHERIT sounds fine to me; will that display ALTER TABLE ONLY
x as the one true way of doing this?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

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