Re: how to create a non-inherited CHECK constraint in CREATE TABLE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Nikhil Sontakke <nikkhils(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Jim Nasby <jim(at)nasby(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: how to create a non-inherited CHECK constraint in CREATE TABLE
Date: 2012-04-11 19:54:42
Message-ID: 29989.1334174082@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:
> +1 for fixing up the syntax before 9.2 goes out the door. I think the
> original syntax was misguided to begin with.

Well, it was fine in isolation, but once you consider how to make CREATE
TABLE do this too, it's hard to avoid the conclusion that you need to
attach the modifier to the CHECK constraint not the ALTER TABLE command.

> CHECK NO INHERIT sounds fine to me; will that display ALTER TABLE ONLY
> x as the one true way of doing this?

s/display/displace/, I think you meant? Yeah, that's what I understand
the proposal to be.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2012-04-11 20:29:36 Re: man pages for contrib programs
Previous Message Robert Haas 2012-04-11 19:45:21 Re: how to create a non-inherited CHECK constraint in CREATE TABLE