Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Andrew Dunstan's message of mié abr 11 15:51:51 -0300 2012:
>> On 04/11/2012 02:45 PM, Tom Lane wrote:
>>> I don't really care for the idea that the ONLY goes in a different place
>>> for this operation than for every other kind of ALTER TABLE, but it does
>>> make sense if you subscribe to the quoted theory that ONLY is a property
>>> of the constraint and not the ALTER command as such.
>> I think I rather dislike it. ONLY should be followed by the name of the
>> parent table whose children it causes us to exclude, IMNSHO. Moving it
>> elsewhere doesn't seem to me to be a blow for clarity at all.
> If that's the only objection, maybe we could use a different keyword
> then, perhaps NOINHERIT:
> ALTER TABLE constraint_rename_test ADD CONSTRAINT con2 CHECK NOINHERIT (b> 0);
I could live with that. "CHECK ONLY" isn't particularly transparent as
to what it means, anyway. "CHECK NOINHERIT" seems a lot clearer.
I'd propose "CHECK NO INHERIT", though, as (a) it seems better English
and (b) it avoids creating any new keyword.
regards, tom lane