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

From Alex Hunsaker
Subject Re: Check constraints on partition parents only?
Date
Msg-id CAFaPBrRe=Vyt=dbDUujvT0_+wYjDRU+pvF=HaGrcJ6z6ZFSm=A@mail.gmail.com
Whole thread Raw
In response to Re: Check constraints on partition parents only?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Check constraints on partition parents only?
List pgsql-hackers
On Wed, Jul 27, 2011 at 14:08, Tom Lane <tgl@sss.pgh.pa.us> 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.

[ For those who missed it ]
pg_dump getting things wrong was a big reason to disallow
ONLYconstraints. That is pg_dump did not treat ONLY constraints
correctly, it always tried to stick them on the parent table:
http://archives.postgresql.org/pgsql-bugs/2007-04/msg00026.php

I for example had some backups that had to be manually fixed (by
removing constraints) to get them to import. I would wager the
mentioned clients that have been doing this have broken backups as
well :-(

Now that we have coninhcnt, conislocal etc... we can probably support
ONLY. But I agree with Robert it's probably a bit more than an
afternoon to crank out :-)


pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Is a heads-up in 9.1 in order regarding the XML-related changes in 9.2?
Next
From: Josh Kupershmidt
Date:
Subject: Re: psql: bogus descriptions displayed by \d+