passing passords to pgsql/pg_create/pg_dump programmatically

Поиск
Список
Период
Сортировка
От filippo
Тема passing passords to pgsql/pg_create/pg_dump programmatically
Дата
Msg-id 1173720138.960358.83320@t69g2000cwt.googlegroups.com
обсуждение исходный текст
Ответы Re: passing passords to pgsql/pg_create/pg_dump programmatically
Список pgsql-general
Hello,

I have written a program perl/Tkprogram, based on postgres. For
maintenance reasons in my program I use these commands:

      `dropdb -U postgres -h $BACKUP_SERVER $BACKUP_DATABASE_NAME`;
      `createdb -U postgres -h $BACKUP_SERVER $BACKUP_DATABASE_NAME`;
      `pg_dump -U postgres -h $DATABASE_SERVER $DATABASE_NAME | psql -
U postgres -h $BACKUP_SERVER $BACKUP_DATABASE_NAME`;

my @psqlOutput = `psql -l -U postgres -h $_`;


my program has a graphic interface but whenever I use these command,
postgres ask for passord in the command line. How can I give these
commands the right passowrd programmatically or how can I   interact
with these to give the passwords by a graphic box?

Thanks and best refards,

Filippo


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

Предыдущее
От: "Alexi Gen"
Дата:
Сообщение: Role & User - Inheritance?
Следующее
От: Dave Thompson
Дата:
Сообщение: plperl question: how to specifiy perl version?