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

2017-09-12 Thread Robert Haas
On Mon, Sep 11, 2017 at 6:41 PM, Michael Paquier wrote: > On Mon, Sep 11, 2017 at 11:43 PM, Robert Haas wrote: >> So I think this is just an excuse for turning --no-security-labels >> into --no-object-property=security-label. To me, that's just

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

2017-09-11 Thread Michael Paquier
On Mon, Sep 11, 2017 at 11:43 PM, Robert Haas wrote: > So I think this is just an excuse for turning --no-security-labels > into --no-object-property=security-label. To me, that's just plain > worse. It does not seem that my thoughts here have been correctly transmitted

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

2017-09-11 Thread Robert Haas
On Sun, Sep 10, 2017 at 6:25 PM, Stephen Frost wrote: > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> As there begins to be many switches of this kind and much code >> duplication, I think that some refactoring into a more generic switch >> infrastructure would be

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

2017-09-10 Thread Stephen Frost
Michael, * Michael Paquier (michael.paqu...@gmail.com) wrote: > As there begins to be many switches of this kind and much code > duplication, I think that some refactoring into a more generic switch > infrastructure would be nicer. I have been thinking about this also and agree that it would be

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

2017-09-06 Thread Michael Paquier
On Thu, Sep 7, 2017 at 1:43 AM, Robert Haas wrote: > On Wed, Sep 6, 2017 at 12:26 PM, Simon Riggs wrote: I'd personally be fine with --no-whatever for any whatever that might be a subsidiary property of database objects. We've got

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

2017-09-06 Thread Robert Haas
On Wed, Sep 6, 2017 at 12:26 PM, Simon Riggs wrote: >>> I'd personally be fine with --no-whatever for any whatever that might >>> be a subsidiary property of database objects. We've got >>> --no-security-labels, --no-tablespaces, --no-owner, and >>> --no-privileges

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

2017-09-06 Thread Simon Riggs
On 1 September 2017 at 22:08, Michael Paquier wrote: > On Sat, Sep 2, 2017 at 1:53 AM, Robert Haas wrote: >> On Mon, Aug 21, 2017 at 5:30 PM, Simon Riggs wrote: >>> Thinking ahead, are we going to add a new --no-objecttype

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

2017-09-01 Thread Michael Paquier
On Sat, Sep 2, 2017 at 1:53 AM, Robert Haas wrote: > On Mon, Aug 21, 2017 at 5:30 PM, Simon Riggs wrote: >> Thinking ahead, are we going to add a new --no-objecttype switch every >> time someone wants it? > > I'd personally be fine with --no-whatever

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

2017-09-01 Thread Robert Haas
On Mon, Aug 21, 2017 at 5:30 PM, Simon Riggs wrote: > Thinking ahead, are we going to add a new --no-objecttype switch every > time someone wants it? I'd personally be fine with --no-whatever for any whatever that might be a subsidiary property of database objects. We've

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

2017-08-21 Thread David G. Johnston
On Mon, Aug 21, 2017 at 2:30 PM, Simon Riggs wrote: > > > The patch applies cleanly to current master and all tests run without > > failures. > > > > I also test against all current supported versions (9.2 ... 9.6) and > didn't > > find any issue. > > > > Changed status to

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

2017-08-21 Thread Simon Riggs
On 7 August 2017 at 16:14, Fabrízio de Royes Mello wrote: > > On Mon, Aug 7, 2017 at 10:43 AM, Robins Tharakan wrote: >> >> On 20 July 2017 at 05:14, Robins Tharakan wrote: >>> >>> On 20 July 2017 at 05:08, Michael Paquier

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

2017-08-07 Thread Fabrízio de Royes Mello
On Mon, Aug 7, 2017 at 10:43 AM, Robins Tharakan wrote: > > On 20 July 2017 at 05:14, Robins Tharakan wrote: >> >> On 20 July 2017 at 05:08, Michael Paquier wrote: >>> >>> On Wed, Jul 19, 2017 at 8:59 PM, >>> Fabrízio de Royes

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

2017-07-19 Thread Robins Tharakan
On 20 July 2017 at 05:08, Michael Paquier wrote: > On Wed, Jul 19, 2017 at 8:59 PM, > ​​ > Fabrízio de Royes Mello > > You should add the properly sgml docs for this pg_dumpall change also. > > Tests of pg_dump go to src/bin/pg_dump/t/ and tests for objects in >

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

2017-07-19 Thread Michael Paquier
On Wed, Jul 19, 2017 at 8:59 PM, Fabrízio de Royes Mello wrote: > On Wed, Jul 19, 2017 at 3:54 PM, Robins Tharakan wrote: >> You may want to consider this patch (attached) which additionally has the >> pg_dumpall changes. >> It would be great if you

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

2017-07-19 Thread Fabrízio de Royes Mello
On Wed, Jul 19, 2017 at 3:54 PM, Robins Tharakan wrote: > > > On 18 July 2017 at 23:55, David Fetter wrote: >> >> Excellent point about pg_dumpall. I'll see what I can draft up in the >> next day or two and report back. > > > > Hi David, > > You may want to

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

2017-07-19 Thread Robins Tharakan
On 18 July 2017 at 23:55, David Fetter wrote: > > Excellent point about pg_dumpall. I'll see what I can draft up in the > next day or two and report back. ​Hi David, You may want to consider this patch (attached) which additionally has the pg_dumpall changes. It would be

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

2017-07-18 Thread David Fetter
On Tue, Jul 18, 2017 at 08:38:25AM +0200, Michael Paquier wrote: > On Tue, Jul 18, 2017 at 3:45 AM, David Fetter wrote: > > 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

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

2017-07-18 Thread Michael Paquier
On Tue, Jul 18, 2017 at 3:45 AM, David Fetter wrote: > 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

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

2017-07-17 Thread David Fetter
On Thu, Jun 01, 2017 at 10:05:09PM -0400, Tom Lane wrote: > Robert Haas writes: > > On Tue, May 30, 2017 at 8:55 PM, David G. Johnston > > wrote: > >>> Having --no-comments seems generally useful to me, in any case. > > >> It smacks of being

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

2017-07-17 Thread Fabrízio Mello
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: tested, passed Spec compliant: not tested Documentation:tested, passed It's a very simple change and I have not to complain about source

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

2017-06-02 Thread Robert Haas
On Thu, Jun 1, 2017 at 10:05 PM, Tom Lane wrote: > I dunno. What's the actual use-case, other than as a bad workaround > to a problem we should fix a different way? Well, that's a fair point. I don't have a specific use case in mind. However, I also don't think that options

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

2017-06-01 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Robert Haas writes: > > On Tue, May 30, 2017 at 8:55 PM, David G. Johnston > > wrote: > >>> Having --no-comments seems generally useful to me, in any case. > > >> It smacks of being excessive to

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

2017-06-01 Thread Tom Lane
Robert Haas writes: > On Tue, May 30, 2017 at 8:55 PM, David G. Johnston > 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

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

2017-06-01 Thread Robert Haas
On Tue, May 30, 2017 at 8:55 PM, David G. Johnston 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

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

2017-05-31 Thread Stephen Frost
David, * David G. Johnston (david.g.johns...@gmail.com) wrote: > On Tue, May 30, 2017 at 8:41 PM, Stephen Frost wrote: > > * David G. Johnston (david.g.johns...@gmail.com) wrote: > > > On Fri, May 26, 2017 at 7:47 AM, Stephen Frost > > wrote: > > > > *

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

2017-05-30 Thread David G. Johnston
Stephen, On Tue, May 30, 2017 at 8:41 PM, Stephen Frost wrote: > David, > > * David G. Johnston (david.g.johns...@gmail.com) wrote: > > On Fri, May 26, 2017 at 7:47 AM, Stephen Frost > wrote: > > > * Robins Tharakan (thara...@gmail.com) wrote: > > > >

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

2017-05-30 Thread Stephen Frost
David, * David G. Johnston (david.g.johns...@gmail.com) wrote: > On Fri, May 26, 2017 at 7:47 AM, Stephen Frost wrote: > > * Robins Tharakan (thara...@gmail.com) wrote: > > > Attached is a patch adds a --no-comments argument to pg_dump to skip > > > generation of COMMENT

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

2017-05-30 Thread David G. Johnston
On Fri, May 26, 2017 at 7:47 AM, Stephen Frost wrote: > Greetings, > > * Robins Tharakan (thara...@gmail.com) wrote: > > Attached is a patch adds a --no-comments argument to pg_dump to skip > > generation of COMMENT statements when generating a backup. This is > crucial > >

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

2017-05-26 Thread Stephen Frost
Greetings, * Robins Tharakan (thara...@gmail.com) wrote: > Attached is a patch adds a --no-comments argument to pg_dump to skip > generation of COMMENT statements when generating a backup. This is crucial > for non-superusers to restore a database backup in a Single Transaction. > Currently, this

[HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump

2017-05-26 Thread Robins Tharakan
Hi, Attached is a patch adds a --no-comments argument to pg_dump to skip generation of COMMENT statements when generating a backup. This is crucial for non-superusers to restore a database backup in a Single Transaction. Currently, this requires one to remove COMMENTs via scripts, which is