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

From Tom Lane
Subject Re: Check constraints on partition parents only?
Date
Msg-id 15123.1311797281@sss.pgh.pa.us
Whole thread Raw
In response to Re: Check constraints on partition parents only?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Check constraints on partition parents only?
Re: Check constraints on partition parents only?
Re: Check constraints on partition parents only?
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Well, I don't have anything strongly against the idea of an
> uninherited constraint, though it sounds like Tom does.  But I think
> allowing it just in the case of CHECK (false) would be pretty silly.
> And, I'm fairly certain that this isn't going to play nice with
> coninhcount... local constraints would have to be marked as local,
> else the wrong things will happen later on when you drop them.

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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Check constraints on partition parents only?
Next
From: "David E. Wheeler"
Date:
Subject: Re: Check constraints on partition parents only?