Review: Non-inheritable check constraints
Alex Hunsaker <badalex@gmail.com>
From: Alex Hunsaker <badalex@gmail.com>
To: NikhilS <nikkhils@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-10-05T19:45:31Z
Lists: pgsql-hackers
Attachments
- non_inh_check_v2.patch.gz (application/x-gzip) patch v2
Hi! *Waves* First off, it all seems to work as described: - regressions pass - domains work - tried various inherit options (merging constraints, alter table no inherit etc) - pg_dump/restore I didn't care for the changes to gram.y so I reworked it a bit so we now pass is_only to AddRelationNewConstraint() (like we do with is_local). Seemed simpler but maybe I missed something. Comments? I also moved the is_only check in AtAddCheckConstraint() to before we grab and loop through any children. Seemed a bit wasteful to loop through the new constraints just to set a flag so that we could bail out while looping through the children. You also forgot to bump Natts_pg_constraint. PFA the above changes as well as being "rebased" against master.