Setting Schema on Restore

Поиск
Список
Период
Сортировка
От Samuel Stearns
Тема Setting Schema on Restore
Дата
Msg-id 68B59BEDCD36854AADBDF17E91B2937A0784188839@EXCHMAIL.staff.internode.com.au
обсуждение исходный текст
Ответы Re: Setting Schema on Restore
Список pgsql-admin

Howdy,

 

Environment:

 

Solaris 10

Postgres 8.3.11

 

I’m running a dump/restore in a shell script.  There are 3 machines involved.  Host1 where the shell script is being run from, host2 where the database is being dumped from, host3 where the database is being restored to.  Shell script looks like this:

 

/usr/postgres/8.3/bin/pg_dump -h <host2> <database> | /usr/postgres/8.3/bin/psql -h <host3> <database>

 

I want to restore into a specific schema.  Psql does not provide a switch for this.  I tried this before the pg_dump command above:

 

Echo “

SET search_path TO <schema>;

“ | /usr/postgres/8.3/bin/psql -h <host3> <database>

 

Which didn’t work.  I also tried this before the pg_dump command:

 

PGOPTIONS=”—search_path=<schema>”

 

Which doesn’t work due to the script running from a different machine.

 

Does anyone have any ideas on how I can achieve this, please?

 

Thank you,

 

Sam

 

 

В списке pgsql-admin по дате отправления:

Предыдущее
От: Anderson Valadares
Дата:
Сообщение: Re: failed to re-find parent key in index "22723655" for split pages 370836/370837
Следующее
От: Evan Sarmiento
Дата:
Сообщение: LDAP AUTH / IDENT question