Re: Starting psql from Script - how to pass the password? - Mailing list pgsql-novice

From Hubert Lubaczewski
Subject Re: Starting psql from Script - how to pass the password?
Date
Msg-id 20030620142204.18abb1f5.hubert.lubaczewski@eo.pl
Whole thread Raw
In response to Starting psql from Script - how to pass the password?  (Dani Oderbolz <oderbolz@ecologic.de>)
Responses Re: Starting psql from Script - how to pass the password?
List pgsql-novice
On Fri, 20 Jun 2003 13:22:50 +0200
Dani Oderbolz <oderbolz@ecologic.de> wrote:

> But still, psql prompts me for the password...
> Is there a way around this?

sure,
just:
export PGPASSWORD="your_password"
before calling postgresql programs.
than it doesn't ask.
but since it's raher dangerous, check if you can (version dependant), and use ~/.pgpass file instead.
you can find more information in postgresql-docs/html/libpq-envars.html

best regards

depesz


pgsql-novice by date:

Previous
From: Dani Oderbolz
Date:
Subject: Starting psql from Script - how to pass the password?
Next
From: Dani Oderbolz
Date:
Subject: Re: Starting psql from Script - how to pass the password?