Re: Restoring to a certain schema

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Opis Boi" <anci(at)centrin(dot)net(dot)id>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Restoring to a certain schema
Date: 2003-02-20 10:23:54
Message-ID: 200302201023.54420.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday 20 Feb 2003 4:59 am, Opis Boi wrote:
> Dear All
>
> I have a dump file from v7.2.3 and wanted to restore it to a certain schema
> in v7.3.2 ( let's call it the abc schema ). The abc schema is also not the
> same with my username.
> So, if I take a look at the search_path, the $user,public won't take me
> there. How do I do that ?
> I've take look on the pg_restore options but it seems none of the option
> provides the solution. Any idea ? ( except to restore it to the public and
> copy the tables to the abc schema ? )

Try "SET search_path = mynewschema;" at the top of the pg_dump file. I'd have
thought that should do the trick.
--
Richard Huxton

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2003-02-20 10:29:54 Re: A problem with sequences...
Previous Message frank_lupo 2003-02-20 10:20:27 truncate problem