Re: pg_dump vs schemas

Поиск
Список
Период
Сортировка
От Francisco Reyes
Тема Re: pg_dump vs schemas
Дата
Msg-id cone.1184612321.418817.54070.5001@35st.simplicato.com
обсуждение исходный текст
Ответ на pg_dump vs schemas  (Francisco Reyes <lists@stringsutils.com>)
Ответы Re: pg_dump vs schemas  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-general
Jeff Davis writes:

> Let's say I have a development database, and I want to copy the entire
> schema myapp_dev1 to schema myapp_dev2 on the same database. Currently,
> it's fairly awkward to do that.

One possible way may be:
Dump the source schema.
Remove references to the schema name in the pg_dump file.
Change search_path and restore schema.

Not sure how this would work with the special Fc format. It should work with
the ASCII format.


> How do other people do that? Is it worth trying to add a way for
> pg_restore to rename object?

In the particular case that you mentioned, if pg_dump could be made to not
include the schema name anywhere that should make the process easier.


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

Предыдущее
От: Madison Kelly
Дата:
Сообщение: Re: Moved postgres, now won't start
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Moved postgres, now won't start