Re: Schema-qualified statements in pg_dump output

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Schema-qualified statements in pg_dump output
Дата
Msg-id 487231C4.3080707@dunslane.net
обсуждение исходный текст
Ответ на Re: Schema-qualified statements in pg_dump output  (Bernd Helmle <mailings@oopsware.de>)
Ответы Re: Schema-qualified statements in pg_dump output  (Bernd Helmle <mailings@oopsware.de>)
Список pgsql-hackers

Bernd Helmle wrote:
> --On Montag, Juli 07, 2008 10:33:35 -0400 Tom Lane <tgl@sss.pgh.pa.us> 
> wrote:
>
>> It seems like quite a useless change, since in general there will be
>> other qualified references in the dump that can't safely be removed.
>> IOW what you intend to do doesn't work anyway.
>
> Hmm, If i want to restore just a bunch of tables into a different 
> schema, all i need to do is to change the dump's search_path then and 
> i don't have to bother with DDL statements having hardwired schema 
> qualifications. So this seems a straight forward simplification to me.
>

Why not restore into the original schema name and then rename it? If the 
schema already exists you could rename it temporarily and then rename it 
back after the restore.

Or, as you originally noted, a simple sed filter on the text dump might 
work equally as well.

I don't think in general we need to provide pg_dump with every possible 
permutation of uses that can achieved with the construction of simple 
tool chains.

cheers

andrew


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Userset logging
Следующее
От: Tom Lane
Дата:
Сообщение: Re: deadlock_timeout