Skip site navigation (1) Skip section navigation (2)

Re: Check constraints on partition parents only?

From: Jerry Sievers <jerry(dot)sievers(at)comcast(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Check constraints on partition parents only?
Date: 2011-07-26 02:59:46
Message-ID: 87tya97nml.fsf@comcast.net (view raw or flat)
Thread:
Lists: pgsql-hackers
Andrew Dunstan <andrew(at)dunslane(dot)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(dot)sievers(at)comcast(dot)net
p: 305.321.1144

In response to

Responses

pgsql-hackers by date

Next:From: Jeff DavisDate: 2011-07-26 03:15:45
Subject: Re: [HACKERS] Error calling PG_RETURN_NULL()
Previous:From: Andrew DunstanDate: 2011-07-26 02:44:32
Subject: Re: Check constraints on partition parents only?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group