passing passords to pgsql/pg_create/pg_dump programmatically

From: "filippo" <filippo2991(at)virgilio(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: passing passords to pgsql/pg_create/pg_dump programmatically
Date: 2007-03-12 17:22:19
Message-ID: 1173720138.960358.83320@t69g2000cwt.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Berglund 2007-03-12 18:15:01 Re: Is This A Set Based Solution?
Previous Message Erik Jones 2007-03-12 17:16:30 Re: Tracking disk writes? (again)