Re: [HACKERS] Re: [GENERAL] pg_dump behaves differently for different archive formats

2014-07-29 Thread Tom Lane
Robert Haas writes: > On Mon, Jul 28, 2014 at 10:55 AM, Tom Lane wrote: >> If we had something like that, I'd be strongly inclined to get rid of >> the existing convention whereby comments and ACL commands are separate >> TOC entries, and make them part of the parent object's TOC entry (which'd >

Re: [HACKERS] Re: [GENERAL] pg_dump behaves differently for different archive formats

2014-07-29 Thread Robert Haas
On Mon, Jul 28, 2014 at 10:55 AM, Tom Lane wrote: > Stephen Frost writes: >> If we're going to change this, it seems to me that the only option would >> be to change the dump format... Just off-the-cuff, I'm wondering if we >> could actually not change the real 'format' but simply promote each A

Re: [HACKERS] Re: [GENERAL] pg_dump behaves differently for different archive formats

2014-07-28 Thread Tom Lane
Stephen Frost writes: > If we're going to change this, it seems to me that the only option would > be to change the dump format... Just off-the-cuff, I'm wondering if we > could actually not change the real 'format' but simply promote each ACL > entry (and similar cases..) to top-level objects an

Re: [HACKERS] Re: [GENERAL] pg_dump behaves differently for different archive formats

2014-07-28 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Albe Laurenz writes: > > I thought that changing the dump format for this would be too > > much trouble, so I came up with the attached. If we're going to change this, it seems to me that the only option would be to change the dump format... Just off-the-

Re: [HACKERS] Re: [GENERAL] pg_dump behaves differently for different archive formats

2014-07-28 Thread Tom Lane
Albe Laurenz writes: > I thought that changing the dump format for this would be too > much trouble, so I came up with the attached. > It assumes that custom- or tar-format archives are written by pg_dump > and cannot contain arbitrary SQL statements, which allows me to get away > with very simpl

[HACKERS] Re: [GENERAL] pg_dump behaves differently for different archive formats

2014-07-28 Thread Albe Laurenz
Tom Lane wrote on Dec 16, 2013: > Albe Laurenz writes: >> Restoring a "plain format" dump and a "custom format" dump of >> the same database can lead to different results: >> pg_dump organizes the SQL statements it creates in "TOC entries". >> If a custom format dump is restored with pg_restore,