Fix pg_dump for inherited validated not-null constraints
Álvaro Herrera <alvherre@kurilemu.de>
Fix pg_dump for inherited validated not-null constraints When a child constraint is validated and the parent constraint it derives from isn't, pg_dump must be coerced into printing the child constraint; failing to do would result in a dump that restores the constraint as not valid, which would be incorrect. Co-authored-by: jian he <jian.universality@gmail.com> Co-authored-by: Álvaro Herrera <alvherre@kurilemu.de> Reported-by: jian he <jian.universality@gmail.com> Message-id: https://postgr.es/m/CACJufxGHNNMc0E2JphUqJMzD3=bwRSuAEVBF5ekgkG8uY0Q3hg@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_dump/common.c | modified | +24 −2 |
| src/bin/pg_dump/pg_dump.c | modified | +15 −5 |
| src/bin/pg_dump/pg_dump.h | modified | +1 −0 |
| src/bin/pg_dump/t/002_pg_dump.pl | modified | +57 −2 |
| src/test/regress/expected/constraints.out | modified | +34 −0 |
| src/test/regress/sql/constraints.sql | modified | +18 −0 |