Scott Ribe <scott_ribe@xxxxxxxxxxxxxxx> writes: > create database test; > \c test > create table base (foo int not null); > create table derived () inherits (base); > alter table derived alter foo drop not null; > insert into derived values(null); > Dump it, and the dump will not include any command to drop the not null > constraint on derived.foo, so restore will fail. Actually, the bug there is that ALTER TABLE lets you set up a self-inconsistent inheritance hierarchy. The above should be illegal because it would mean that "select foo from base" could return nulls, contradicting the clear definition of the table. We've been talking about fixing that, but it'll probably take catalog changes (to be able to track which constraints were inherited from a parent table) so this isn't ever going to be enforced by any existing release. regards, tom lane