Re: pg_dump DROP commands and implicit search paths - Mailing list pgsql-hackers

From Oliver Elphick
Subject Re: pg_dump DROP commands and implicit search paths
Date
Msg-id 1021355922.1521.79.camel@linda
Whole thread Raw
In response to Re: pg_dump DROP commands and implicit search paths  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_dump DROP commands and implicit search paths  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pg_dump DROP commands and implicit search paths  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
List pgsql-hackers
On Tue, 2002-05-14 at 01:42, Tom Lane wrote:
> nconway@klamath.dyndns.org (Neil Conway) writes:
> > I'd prefer this method -- IMHO the readibility of dump scripts isn't
> > a top priority (or if it is, we're not doing very well in that regard
> > any). I think dump scripts should be as verbose as is necessary to
> > ensure that they can't be misinterpreted.

I agree with Neil on this.

> Perhaps instead of "readability" I should have said "editability".
> The thought that is lurking behind this is that you might want to
> retarget a dump script to be reloaded in some other schema.  If the
> dump is cluttered with umpteen thousand copies of the schema name
> that's going to be difficult.

sed -e 's/ old_schema\./ new_schema./g'

I don't think you should allow the dump to be ambiguous for the sake of
making rarely used actions slightly more convenient.

> Ideally I'd like the dumped object definitions to contain *no* explicit
> references to their containing schema.  This would allow, for example,
> a pg_restore mode that loads the objects into a different schema.

Provide a command line option to pg_restore to do an automatic edit of
the schema name (-E old_schema,new_schema).  People using "psql <dump"
would have to edit the dump.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
    "Yea, though I walk through the valley of the shadow of     death, I will fear no evil, for thou art with me;
thyrod and thy staff they comfort me."  Psalms 23:4  

pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Discontent with development process (was:Re: pgaccess
Next
From: Tom Lane
Date:
Subject: Re: pg_dump DROP commands and implicit search paths