Re: Check constraints on partition parents only?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Nikhil Sontakke <nikkhils(at)gmail(dot)com>, Alex Hunsaker <badalex(at)gmail(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-29 13:45:39
Message-ID: 24021.1311947139@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Jul 29, 2011 at 8:30 AM, Nikhil Sontakke <nikkhils(at)gmail(dot)com> wrote:
>> Yeah, I have already hacked it a bit. This constraint now needs to be
>> spit out later as an ALTER command with ONLY attached to it
>> appropriately. Earlier all CHECK constraints were generally emitted as
>> part of the table definition itself.

> Hrm. That doesn't seem so good. Maybe we've got the design wrong
> here. It doesn't seem like we want to lose the ability to define
> arbitrary constraints at table-creation time.

Well, you can't define arbitrary indexes within the CREATE TABLE syntax,
either. This does not bother me a lot.

We could imagine doing something like CHECK ONLY (foo), but that seems
quite non-orthogonal with (a) everything else in CREATE TABLE, and
(b) ALTER TABLE ONLY.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikhil Sontakke 2011-07-29 13:47:52 Re: Check constraints on partition parents only?
Previous Message Tom Lane 2011-07-29 13:37:01 Re: Check constraints on partition parents only?