Support --no-comments in pg_dump, pg_dumpall, pg_restore.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 25 Jan 2018 20:27:24 +0000 (15:27 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 25 Jan 2018 20:27:24 +0000 (15:27 -0500)
commit1368e92e16a098338e39c8e540bdf9f6cf35ebf4
tree4800270dfb7b24da04054281189dac4b6f728f99
parentbb415675d8ab6e776321a96f9c0e77c12fda96ea
Support --no-comments in pg_dump, pg_dumpall, pg_restore.

We have switches already to suppress other subsidiary object properties,
such as ACLs, security labels, ownership, and tablespaces, so just on
the grounds of symmetry we should allow suppressing comments as well.
Also, commit 0d4e6ed30 added a positive reason to have this feature,
i.e. to allow obtaining the old behavior of selective pg_restore should
anyone desire that.

Recent commits have removed the cases where pg_dump emitted comments on
built-in objects that the restoring user might not have privileges to
comment on, so the original primary motivation for this feature is gone,
but it still seems at least somewhat useful in its own right.

Robins Tharakan, reviewed by Fabrízio Mello

Discussion: https://postgr.es/m/CAEP4nAx22Z4ch74oJGzr5RyyjcyUSbpiFLyeYXX8pehfou92ug@mail.gmail.com
doc/src/sgml/ref/pg_dump.sgml
doc/src/sgml/ref/pg_dumpall.sgml
doc/src/sgml/ref/pg_restore.sgml
src/bin/pg_dump/pg_backup.h
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_dump/pg_restore.c