Re: how to create a non-inherited CHECK constraint in CREATE TABLE
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@commandprompt.com>, Nikhil Sontakke <nikkhils@gmail.com>, Peter Eisentraut <peter_e@gmx.net>, Jim Nasby <jim@nasby.net>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-04-11T19:54:42Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.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