From: Álvaro Herrera <alvherre@kurilemu.de>
To: jian he <jian.universality@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pg_dump does not dump domain not-null constraint's comments
Date: Wed, 7 May 2025 11:25:53 +0200
Message-ID: <202505070925.4wymawhqsuvm@alvherre.pgsql> (raw)
In-Reply-To: <CACJufxF-0bqVR=j4jonS6N2Ka6hHUpFyu3_3TWKNhOW_4yFSSg@mail.gmail.com>
On 2025-May-07, jian he wrote:
> in PG17 and master, pg_dump (--schema=test --no-owner)
> [...]
> didn't produce
> COMMENT ON CONSTRAINT nn ON DOMAIN test.d1 IS 'not null constraint on
> domain d1';
> we should make pg_dump to produce it too?
Yes, this is clearly a pg17 bug whose fix should be backpatched.
> The attached patch tries to make it produce comments on not-null
> constraints on domains.
Thanks, I'll have a look.
> I aslo renamed struct TypeInfo fields, nDomChecks will be renamed to
> nDomConstrs; domChecks will be renamed to domConstrs.
> TypeInfo->domConstrs will also include not-null constraint
> information, changing from domChecks to domConstrs makes sense, IMHO.
Hmm, for a backpatch I would leave the field names alone since they are
publicly visible; we can rename separately in pg19 once it opens. Can
you resubmit splitting the renaming out to a 0002 patch?
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"In fact, the basic problem with Perl 5's subroutines is that they're not
crufty enough, so the cruft leaks out into user-defined code instead, by
the Conservation of Cruft Principle." (Larry Wall, Apocalypse 6)
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-hackers@postgresql.org
Cc: alvherre@kurilemu.de, jian.universality@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: pg_dump does not dump domain not-null constraint's comments
In-Reply-To: <202505070925.4wymawhqsuvm@alvherre.pgsql>
* 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