Обсуждение: Restoring to a certain schema

Поиск
Список
Период
Сортировка

Restoring to a certain schema

От
"Opis Boi"
Дата:
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 ? )
 
Thank you in advance
Andy

Re: Restoring to a certain schema

От
Richard Huxton
Дата:
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