Hi jian, v4 looks good to me. One case is still lost after dump and restore, on master and 19, and also on 18:
create table p1 (a int, constraint c check (a > 0)); create table p2 (a int, constraint c check (a > 0) not enforced); create table k () inherits (p1, p2); alter table k no inherit p1; k's c is not local here, so it comes back NOT ENFORCED. I think pg_dump still needs the ALTER CONSTRAINT ... ENFORCED from my v2-0003 for this case. Thanks, Shihao
