Re: Patch: Add --no-comments to skip COMMENTs with pg_dump

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Robins Tharakan <tharakan(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch: Add --no-comments to skip COMMENTs with pg_dump
Date: 2017-07-18 01:45:28
Message-ID: 20170718014527.GE9936@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 01, 2017 at 10:05:09PM -0400, Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Tue, May 30, 2017 at 8:55 PM, David G. Johnston
> > <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
> >>> Having --no-comments seems generally useful to me, in any case.
>
> >> It smacks of being excessive to me.
>
> > It sounds perfectly sensible to me. It's not exactly an elegant
> > solution to the original problem, but it's a reasonable switch on
> > its own merits.
>
> I dunno. What's the actual use-case, other than as a bad workaround
> to a problem we should fix a different way?

The one I run into frequently is in a proprietary fork, RDS Postgres.
It'll happily dump out COMMENT ON EXTENSION plpgsq IS ...
which is great as far as it goes, but errors out when you try to
reload it.

While bending over backwards to support proprietary forks strikes me
as a terrible idea, I'd like to enable pg_dump to produce and consume
ToCs just as pg_restore does with its -l/-L options. This would
provide the finest possible grain.

Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-07-18 02:03:28 Re: Oddity in error handling of constraint violation in ExecConstraints for partitioned tables
Previous Message Mark Dilger 2017-07-18 00:15:47 Re: Something for the TODO list: deprecating abstime and friends