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: Fix dumping of comments on invalid constraints on domains
Date: Wed, 16 Jul 2025 17:23:59 +0000
Message-ID: <E1uc5rL-006cTm-19@gemulon.postgresql.org> (raw)

Fix dumping of comments on invalid constraints on domains

We skip dumping constraints together with domains if they are invalid
('separate') so that they appear after data -- but their comments were
dumped together with the domain definition, which in effect leads to the
comment being dumped when the constraint does not yet exist.  Delay
them in the same way.

Oversight in 7eca575d1c28; backpatch all the way back.

Author: jian he <jian.universality@gmail.com>
Discussion: https://postgr.es/m/CACJufxF_C2pe6J_+nPr6C5jf5rQnbYP8XOKr4HM8yHZtp2aQqQ@mail.gmail.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/57949cea5af06ee20d04e225fca34d855518e47f

Modified Files
--------------
src/bin/pg_dump/pg_dump.c                  | 23 ++++++++++++++++++++++-
src/test/regress/input/constraints.source  |  6 ++++++
src/test/regress/output/constraints.source |  4 ++++
3 files changed, 32 insertions(+), 1 deletion(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1uc5rL-006cTm-19@gemulon.postgresql.org>
Permalink:  ../E1uc5rL-006cTm-19@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uc5rL-006cTm-19@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: Fix dumping of comments on invalid constraints on domains
  In-Reply-To: <E1uc5rL-006cTm-19@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