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

Álvaro Herrera <alvherre@kurilemu.de>

Commit: f9545e95c5e7ead0c19676ef8c966eb21f573954
Author: Álvaro Herrera <alvherre@kurilemu.de>
Date: 2025-07-21T09:34:10Z
Releases: 18.0
pg_dump: include comments on not-null constraints on domains, too

Commit e5da0fe3c22b introduced catalog entries for not-null constraints
on domains; but because commit b0e96f311985 (the original work for
catalogued not-null constraints on tables) forgot to teach pg_dump to
process the comments for them, this one also forgot.  Add that now.

We also need to teach repairDependencyLoop() about the new type of
constraints being possible for domains.

Backpatch-through: 17
Co-authored-by: jian he <jian.universality@gmail.com>
Co-authored-by: Álvaro Herrera <alvherre@kurilemu.de>
Reported-by: jian he <jian.universality@gmail.com>
Discussion: https://postgr.es/m/CACJufxF-0bqVR=j4jonS6N2Ka6hHUpFyu3_3TWKNhOW_4yFSSg@mail.gmail.com

Files

PathChange+/−
src/bin/pg_dump/pg_dump.c modified +120 −40
src/bin/pg_dump/pg_dump.h modified +3 −1
src/bin/pg_dump/pg_dump_sort.c modified +9 −6
src/bin/pg_dump/t/002_pg_dump.pl modified +28 −2

Discussion