From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix pg_dump for inherited validated not-null constraints |
Date: | 2025-04-28 14:42:35 |
Message-ID: | E1u9Pgp-00017F-1n@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)universality(at)gmail(dot)com>
Co-authored-by: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Reported-by: jian he <jian(dot)universality(at)gmail(dot)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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2025-04-28 16:11:45 | pgsql: Make NULL tuple values always advance skip arrays. |
Previous Message | Peter Eisentraut | 2025-04-28 12:33:22 | pgsql: pg_combinebackup: Message style improvements |