Re: pg_dump and schema names - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pg_dump and schema names
Date
Msg-id 20130812180716.GB12510@momjian.us
Whole thread Raw
In response to Re: pg_dump and schema names  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On Mon, Aug 12, 2013 at 12:28:26PM -0400, Peter Eisentraut wrote:
> On 8/9/13 12:04 AM, Bruce Momjian wrote:
> > generates this output:
> > 
> >     SET search_path = xx, pg_catalog;
> >     CREATE TABLE test (
> >         x integer
> >     );
> > 
> > If you dump a schema and want to reload it into another schema, you
> > should only need to update that one search_path line.
> 
> Is anyone actually using that feature?  It doesn't seem very reliable.
> You can't just change the schema name in one or two places.  You'd have
> to manually inspect function source code, for example.

True.  I think the larger issue is that we use search_path to avoid
specifying the schema name in lots of places, and SET OWNER should do
the same.  I think the schema reload case is just a side-effect.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: killing pg_dump leaves backend process
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: lob conversion functionality