Re: Check constraints on partition parents only? - Mailing list pgsql-hackers

From Jerry Sievers
Subject Re: Check constraints on partition parents only?
Date
Msg-id 87tya97nml.fsf@comcast.net
Whole thread Raw
In response to Re: Check constraints on partition parents only?  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Check constraints on partition parents only?
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:

> On 07/25/2011 10:31 PM, Jerry Sievers wrote:
>> Hackers;
>>
>> I just noticed that somewhere between 8.2 and 8.4, an exception is
>> raised trying to alter table ONLY some_partition_parent ADD CHECK
>> (foo).
>>
>
>
> 8.4 had this change:
>
>        *
>
>          Force child tables to inherit CHECK constraints from parents
>          (Alex Hunsaker, Nikhil Sontakke, Tom)
>
>          Formerly it was possible to drop such a constraint from a
>          child table, allowing rows that violate the constraint to be
>          visible when scanning the parent table. This was deemed
>          inconsistent, as well as contrary to SQL standard.
>
>
> You're not the only one who occasionally bangs his head against it.
>
> cheers
>
> andrew

Thanks Andrew!...  Yeah, I figured it was a documented change but too
lazy tonight to browse release notes :-)

The previous behavior was to me convenient, but I agree, probably lead
to some confusion too.

That our version of partitioning can be overloaded like this though I
think adds power.  A bit of which we lost adding the restrictgion.
>
>
>
>

-- 
Jerry Sievers
e: jerry.sievers@comcast.net
p: 305.321.1144


pgsql-hackers by date:

Previous
From: "_石头"
Date:
Subject: How to use CreateFunctionStmt's RETURN TABLE?
Next
From: Noah Misch
Date:
Subject: Re: Another issue with invalid XML values