Re: how to create a non-inherited CHECK constraint in CREATE TABLE
Nikhils <nikkhils@gmail.com>
From: Nikhil Sontakke <nikkhils@gmail.com>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Noah Misch <noah@leadboat.com>, Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Peter Eisentraut <peter_e@gmx.net>, Jim Nasby <jim@nasby.net>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-04-19T15:25:59Z
Lists: pgsql-hackers
Attachments
- check_constraint_create_table_support_no_inherit_syntax.patch (application/octet-stream) patch
Hi, Are you going to submit an updated patch? I started working on your > original a couple of days ago but got distracted by some family news > here. I'll send it to you so that you can start from there, to avoid > duplicate work. > > Thanks Alvaro. PFA, a revised patch with the "NO INHERIT" support in the complete sense. I also fixed up the ALTER TABLE ONLY ... CHECK semantics as per Noah's suggestion upthread. We now allow ONLY if the table has no children currently. The pg_dump sources have also been cleaned up now that these constraints need not be dumped separately. So this is a good change overall. Have used connoinherit as the name in the catalog and Alvaro replaced is_only references with is_no_inherit so that stays. I leave it to the eventual committer now to pick up any more variations if desired :) Regards, Nikhils