passing passords to pgsql/pg_create/pg_dump programmatically - Mailing list pgsql-general

From filippo
Subject passing passords to pgsql/pg_create/pg_dump programmatically
Date
Msg-id 1173720138.960358.83320@t69g2000cwt.googlegroups.com
Whole thread Raw
Responses Re: passing passords to pgsql/pg_create/pg_dump programmatically  (Alvaro Herrera <alvherre@commandprompt.com>)
List 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 by date:

Previous
From: "Alexi Gen"
Date:
Subject: Role & User - Inheritance?
Next
From: Dave Thompson
Date:
Subject: plperl question: how to specifiy perl version?