pgsql: pg_dump: include comments on valid not-null constraints, too

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_dump: include comments on valid not-null constraints, too
Date: 2025-06-26 16:24:56
Message-ID: E1uUpPE-003SDU-1Z@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_dump: include comments on valid not-null constraints, too

We were missing collecting comments for not-null constraints that are
dumped inline with the table definition (i.e., valid ones), because they
aren't represented by a separately dumpable object. Fix by creating
separate TocEntries for the comments.

Co-Authored-By: Jian He <jian(dot)universality(at)gmail(dot)com>
Co-Authored-By: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Reported-By: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Reviewed-By: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Discussion: https://postgr.es/m/d50ff977-c728-4e9e-8488-fc2688e08754@oss.nttdata.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/47fb87563bf3cca2244840241dde2eb93830559b

Modified Files
--------------
doc/src/sgml/ref/pg_dump.sgml | 2 +-
src/bin/pg_dump/pg_dump.c | 92 +++++++++++++++++++++++++++----
src/bin/pg_dump/pg_dump.h | 1 +
src/bin/pg_dump/t/002_pg_dump.pl | 32 ++++++++++-
src/test/regress/expected/constraints.out | 2 +
src/test/regress/sql/constraints.sql | 3 +
6 files changed, 118 insertions(+), 14 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Álvaro Herrera 2025-06-26 16:27:27 pgsql: docs: fix typo
Previous Message Fujii Masao 2025-06-26 11:26:57 pgsql: Make CREATE TABLE LIKE copy comments on NOT NULL constraints whe