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

Jim Nasby <jim@nasby.net>

From: Jim Nasby <jim@nasby.net>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Peter Eisentraut <peter_e@gmx.net>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-01-17T22:59:06Z
Lists: pgsql-hackers
On Jan 17, 2012, at 11:07 AM, Alvaro Herrera wrote:
> Excerpts from Peter Eisentraut's message of mar ene 17 13:59:57 -0300 2012:
>> It appears that the only way to create a non-inherited CHECK constraint
>> is using ALTER TABLE.  Is there no support in CREATE TABLE planned?
>> That looks a bit odd.
> 
> There are no plans to do that AFAIR, though maybe you could convince
> Nikhil to write the patch to do so.

That certainly doesn't meet the principle of least surprise... CREATE TABLE should support this.
--
Jim C. Nasby, Database Architect                   jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net