Re: pg_dump vs schemas

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: pg_dump vs schemas
Дата
Msg-id 1184612769.16532.15.camel@dogma.ljc.laika.com
обсуждение исходный текст
Ответ на Re: pg_dump vs schemas  (Francisco Reyes <lists@stringsutils.com>)
Список pgsql-general
On Mon, 2007-07-16 at 14:58 -0400, Francisco Reyes wrote:
> 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.

That's what I currently do. It seems a little flimsy though: there are
too many objects to really remove the references by hand, so we do a
global search-and-replace. As long as the schema name is unique enough,
I suppose it's alright for a development (non-production) database.

> > 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.

That's what I was thinking. It might be better placed in pg_restore
though, so that way you can decide after you've already made the backup.

Regards,
    Jeff Davis


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Moved postgres, now won't start
Следующее
От: Steve Atkins
Дата:
Сообщение: Re: What's the logical counterpart of the to_hex function?