On Fri, Nov 25, 2011 at 4:28 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
>
> Excerpts from Dean Rasheed's message of vie nov 25 13:45:34 -0300 2011:
>
>> Looking back at Thom's original example, it seems odd to allow this
>> syntax at all:
>>
>> CREATE TABLE a (
>> num integer,
>> CONSTRAINT meow CHECK ((num < 20)) NOT VALID
>> );
>>
>> It's not documented, but is currently allowed. However, since all data
>> subsequently added to the table is checked against the constraint, the
>> constraint is guaranteed to be valid, so there seems to be no point in
>> allowing it to be declared NOT VALID.
>
> Hah ... interesting. Not sure it's worth fussing about this. If the
> user shoots himself in the foot by declaring an unvalidated constraint,
> which is not even documented, are we really at fault?
>
i can't find anything about this in the standard, so i guess even if
the standard allows us to turn checks off. ours is not standard syntax
so, IMHO, it should be only in ALTER TABLE.
--
Jaime Casanova www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación