Fix dumping of comments on invalid constraints on domains
authorÁlvaro Herrera <alvherre@kurilemu.de>
Wed, 16 Jul 2025 17:22:53 +0000 (19:22 +0200)
committerÁlvaro Herrera <alvherre@kurilemu.de>
Wed, 16 Jul 2025 17:22:53 +0000 (19:22 +0200)
commite04aca1c4d33020527dd343b48d9ffe575f3bbd7
tree762193268c857551fc4b428d0eca12756bd13e78
parent0490d6efd2daede5305fb3c274d11f12e1eda732
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: http://postgr.es/m/CACJufxF_C2pe6J_+nPr6C5jf5rQnbYP8XOKr4HM8yHZtp2aQqQ@mail.gmail.com
src/bin/pg_dump/pg_dump.c
src/test/regress/input/constraints.source
src/test/regress/output/constraints.source