There's no way in the pg_ tables to identify when a check constraint on an inherited table should not be inherited. Example: create table t1 (col1 number(10)); create table t2 () inherits t2; alter table only t1 add constraint ck_col1 check (number <> 0); Now, run pg_dump and notice that the check constraint is not created with ONLY in the dump and, therefore, ends up on t2 when executed.
Chris Fischer Database Engineer <http://www.channeladvisor.com/> ChannelAdvisor Corporation 2701 Aerial Center Parkway Morrisville | North Carolina | 27560 919.228.2011 Many Channels. One Advisor. www.channeladvisor.com <http://www.channeladvisor.com/> <http://feeds.feedburner.com/ChanneladvisorBlog>
ca_complete.gif
Description: ca_complete.gif
ChanneladvisorBlog.gif
Description: ChanneladvisorBlog.gif