Re: Dump tables with pg_dump - no or different Owner

Поиск
Список
Период
Сортировка
От Alex Satrapa
Тема Re: Dump tables with pg_dump - no or different Owner
Дата
Msg-id 4003202A.5070201@lintelsys.com.au
обсуждение исходный текст
Ответ на Dump tables with pg_dump - no or different Owner  (Victor Spång Arthursson <victor@tosti.dk>)
Список pgsql-general
Victor Spång Arthursson wrote:
> Have a problem, probably easy to solve... I want to dump a database
> which resides on my local server with another, and not existing, owner
> than the one who actually owns it locally.

If the whole database is going to be owned by one user, try dumping the
tables like this:

pg_dump --no-privileges --no-owner --no-reconnect ... > tables.sql

Then load the tables as the new owner on the new database.

An alternative is to process the SQL dump using perl:

perl -p -i -e 's/old-owner-name/new-owner-name/g' tables.sql


HTH
Alex Satrapa


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Case sensitivity
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Vacuum Error