pgsql: Fix pg_dump for inherited validated not-null constraints - Mailing list pgsql-committers

From Álvaro Herrera
Subject pgsql: Fix pg_dump for inherited validated not-null constraints
Date
Msg-id E1u9Pgp-00017F-1n@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0e13b13d26e870cb18fe6ecf9f8697ddfcf2c740

Modified Files
--------------
src/bin/pg_dump/common.c                  | 26 ++++++++++++--
src/bin/pg_dump/pg_dump.c                 | 20 ++++++++---
src/bin/pg_dump/pg_dump.h                 |  1 +
src/bin/pg_dump/t/002_pg_dump.pl          | 59 +++++++++++++++++++++++++++++--
src/test/regress/expected/constraints.out | 34 ++++++++++++++++++
src/test/regress/sql/constraints.sql      | 18 ++++++++++
6 files changed, 149 insertions(+), 9 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: pg_combinebackup: Message style improvements
Next
From: Peter Geoghegan
Date:
Subject: pgsql: Make NULL tuple values always advance skip arrays.