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

Re: Check constraints on partition parents only?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Jerry Sievers <gsievers19(at)comcast(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Check constraints on partition parents only?
Date: 2011-07-27 20:17:43
Message-ID: 4E307267.6000506@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackers

On 07/27/2011 04:14 PM, David E. Wheeler wrote:
> On Jul 27, 2011, at 1:08 PM, Tom Lane wrote:
>
>> Yeah.  If we're going to allow this then we should just have a concept
>> of a non-inherited constraint, full stop.  This might just be a matter
>> of removing the error thrown in ATAddCheckConstraint, but I'd be worried
>> about whether pg_dump will handle the case correctly, what happens when
>> a new child is added later, etc etc.
> Is this looking at the wrong problem? The reason I've wanted to get a parent check constraint not to fire in a child is because I'm using the parent/child relationship for partioning. Will this be relevant if/when an independent partitioning feature is added that does not rely on table inheritance?
>
>

Yes, I have clients using inheritance for non-partitioning purposes, and 
they would love to have this.

cheers

andrew

In response to

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2011-07-27 20:19:22
Subject: Re: SSI error messages
Previous:From: David E. WheelerDate: 2011-07-27 20:14:35
Subject: Re: Check constraints on partition parents only?

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