Re: pg_dump and schema names

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: pg_dump and schema names
Date: 2013-08-12 18:07:16
Message-ID: 20130812180716.GB12510@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2013-08-12 18:08:09 Re: proposal: lob conversion functionality
Previous Message Tom Lane 2013-08-12 17:56:55 Re: killing pg_dump leaves backend process