Re: dumping a password-protected db from a perl script or

Поиск
Список
Период
Сортировка
От dima
Тема Re: dumping a password-protected db from a perl script or
Дата
Msg-id 3DC68FD6.5060504@mail.ru
обсуждение исходный текст
Ответ на dumping a password-protected db from a perl script or a binary  (dima <_pppp@mail.ru>)
Список pgsql-admin
>>How can i dump a password-protected database using perl (DBI or pg) or C
>>(using libpq)? I can't pass the password to pg_dump utility (I was
>>trying to pass it via tty also) when running system() from perl.
>
>
>     Isn't example below something like what you are trying to do:
>
> ====8<====
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(void) {
>         system("export PGDATABASE=\"test\"; export PGPASSWORD=\"test\"; export PGUSER=\"test\"; psql");
>
>         exit(0);
> }
> ====8<====
>
>     ? Here psql should connect to db 'test' as user 'test', password
> 'test'. Check if it works with pg_dump.

This doesn't work on my 7.2.1 installation :/
I need to run pg_dump actually.



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

Предыдущее
От: Artur Pietruk
Дата:
Сообщение: Re: dumping a password-protected db from a perl script or a binary
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: HA for high insert volume