How to do pg_dump + pg_restore within Perl script?

Поиск
Список
Период
Сортировка
От Kynn Jones
Тема How to do pg_dump + pg_restore within Perl script?
Дата
Msg-id AANLkTil86SHMcdCjVuOEam-QVEJMxXBFRbyr_7f32kVk@mail.gmail.com
обсуждение исходный текст
Ответы Re: How to do pg_dump + pg_restore within Perl script?  ("Greg Sabino Mullane" <greg@turnstep.com>)
Список pgsql-general
I would like to replicate the following Unix pipe within a Perl script, perhaps using DBD::Pg:

% pg_dump -Z9 -Fc -U <DB_USER> <FROM_DB> | pg_restore -v -d <TO_DB> -p <SSH_TUNNEL_PORT> -h localhost -U <DB_USER>

Of course, I can try to use Perl's system, and the like, to run this pipe verbatim, but I this as a last-resort approach.

Is there a more direct way?

Thanks!

~K

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: peer-to-peer replication with Postgres
Следующее
От: Daniel Scott
Дата:
Сообщение: PostgreSQL 9.0 - support for RANGE value PRECEDING window functions