Re: Check constraints on partition parents only?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, 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:20:35
Message-ID: CA+TgmoagDH0yjNxduDr62t8cN3dWW9xWPA8eVbnNMZ_tAjj2Cw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 27, 2011 at 4:08 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)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.

Right. I'm fairly sure all that stuff is gonna break with the
proposed implementation. It's a solvable problem, but it's going to
take more than an afternoon to crank it out.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2011-07-27 20:22:10 Re: SSI error messages
Previous Message Peter Eisentraut 2011-07-27 20:19:22 Re: SSI error messages