Re: search_path when restoring to new db

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: SunWuKung <Balazs(dot)Klein(at)t-online(dot)hu>, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: search_path when restoring to new db
Date: 2006-12-11 17:56:39
Message-ID: 1165859799.3243.98.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2006-12-11 at 10:06, Tom Lane wrote:
> "SunWuKung" <Balazs(dot)Klein(at)t-online(dot)hu> writes:
> > It seems to me that if I dump and restore a database as a new db I need
> > to manually issue
> > ALTER DATABASE dbname SET search_path=schema1, schema2;
> > to get back the search_path of the original db.
>
> ALTER DATABASE and ALTER USER commands are handled by pg_dumpall, not
> pg_dump.

And you can use pg_dumpall -s to get those:

pg_dumpall -s|grep -i "alter database"|grep -i search_path

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kirk Wythers 2006-12-11 18:00:10 out of memory error on 3 table join
Previous Message Bob Pawley 2006-12-11 17:44:58 Geometric Types