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.universal...@gmail.com>
Discussion: 
https://postgr.es/m/cacjufxf_c2pe6j_+npr6c5jf5rqnbyp8xokr4hm8yhztp2a...@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0858f0f96ebb891c8960994f023ed5a17b758a38

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

Reply via email to