pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@kurilemu.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_dump: include comments on valid not-null constraints, too
Date: Thu, 26 Jun 2025 16:24:56 +0000
Message-ID: <E1uUpPE-003SDU-1Z@gemulon.postgresql.org> (raw)

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.universality@gmail.com>
Co-Authored-By: Álvaro Herrera <alvherre@kurilemu.de>
Reported-By: Fujii Masao <masao.fujii@oss.nttdata.com>
Reviewed-By: Fujii Masao <masao.fujii@oss.nttdata.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(-)



Message-ID: <E1uUpPE-003SDU-1Z@gemulon.postgresql.org>
Permalink:  ../E1uUpPE-003SDU-1Z@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uUpPE-003SDU-1Z@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: alvherre@kurilemu.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: pg_dump: include comments on valid not-null constraints, too
  In-Reply-To: <E1uUpPE-003SDU-1Z@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox