Re: Providing the password to psql from a script - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Providing the password to psql from a script
Date
Msg-id 20040215095035.GC25040@svana.org
Whole thread Raw
In response to Re: Providing the password to psql from a script  (Willem Herremans <willem.herremans@belgacom.net>)
List pgsql-general
On Sun, Feb 15, 2004 at 10:27:07AM +0100, Willem Herremans wrote:
> I am afraid this does not help me very much.
>
> The manpage of psql neither mentions the PGPASS environment variable,
> nor the .pgpass file.

Ok, so they're mentioned in the documentation, one under environment
variables. The other is mentioned in there too, aswell as briefly on the
manpage for pg_dumpall. A quick google should find the details for you.

> I understand that, if the server is configured such that the client can
> authenticate wihout password, that psql does not prompt for a password,
> but it would be a serious limitation for my application that it cannot
> support authenitication by means of password.

You could always redirect the password into stderr, though that's a bit of a
hack. Better just use one of the above supported methods.

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> If the Catholic church can survive the printing press, science fiction
> will certainly weather the advent of bookwarez.
>    http://craphound.com/ebooksneitherenorbooks.txt - Cory Doctorow

Attachment

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Providing the password to psql from a script
Next
From: Willem Herremans
Date:
Subject: Re: Providing the password to psql from a script