pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Support --no-comments in pg_dump, pg_dumpall, pg_restore.
Date: Thu, 25 Jan 2018 20:27:29 +0000
Message-ID: <E1eeo7N-0003ZA-Jo@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1368e92e16a098338e39c8e540bdf9f6cf35ebf4

Modified Files
--------------
doc/src/sgml/ref/pg_dump.sgml        |  9 +++++++++
doc/src/sgml/ref/pg_dumpall.sgml     |  9 +++++++++
doc/src/sgml/ref/pg_restore.sgml     |  9 +++++++++
src/bin/pg_dump/pg_backup.h          |  2 ++
src/bin/pg_dump/pg_backup_archiver.c |  6 +++++-
src/bin/pg_dump/pg_dump.c            | 19 +++++++++++++++++--
src/bin/pg_dump/pg_dumpall.c         |  9 +++++++--
src/bin/pg_dump/pg_restore.c         |  4 ++++
8 files changed, 62 insertions(+), 5 deletions(-)



Message-ID: <E1eeo7N-0003ZA-Jo@gemulon.postgresql.org>
Permalink:  ../E1eeo7N-0003ZA-Jo@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eeo7N-0003ZA-Jo@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Support --no-comments in pg_dump, pg_dumpall, pg_restore.
  In-Reply-To: <E1eeo7N-0003ZA-Jo@gemulon.postgresql.org>
  References: <E1eeo7N-0003ZA-Jo@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox