pg_dump: make dumpPublication et al. less unlike sibling functions.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 31 Dec 2021 00:40:37 +0000 (19:40 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 31 Dec 2021 00:40:53 +0000 (19:40 -0500)
commit5e65df64d631257ce60016bec0aca43f042b1d33
tree2b4be2c0ce8ba0c7523cee5dd7796ba4ed4f0122
parentc9105dd3660f4a801e6f87a1ed68189bd30576bf
pg_dump: make dumpPublication et al. less unlike sibling functions.

dumpPublication, dumpPublicationNamespace, dumpPublicationTable, and
dumpSubscription failed to check dataOnly.  This is just a latent bug,
because pg_backup_archiver.c would filter out the ArchiveEntry later;
but they're wasting cycles in data-only dumps, and the omission might
become a live bug someday.  In any case, it's not good to have some
dumpFoo functions do this and some not.

On the same reasoning, make dumpPublicationNamespace follow the
same pattern as every other dumpFoo function for checking the
DUMP_COMPONENT_DEFINITION flag.  (Since 5209c0ba0, we wouldn't
even get here if that flag isn't set, so checking it is just
pro forma right now.  But it might not be so forever.)

Since this is just cosmetic and/or future-proofing, no need for
back-patch.
src/bin/pg_dump/pg_dump.c