Re: Pass password in scripts? - Mailing list pgsql-novice

From Jan Danielsson
Subject Re: Pass password in scripts?
Date
Msg-id 45D3CB1D.6030801@gmail.com
Whole thread Raw
In response to Re: Pass password in scripts?  ("Neil Aggarwal" <neil@JAMMConsulting.com>)
List pgsql-novice
Neil Aggarwal wrote:
> When I try that, I get:
>
> /usr/local/pgsql/bin/psql: option `--password' doesn't allow an argument
>
>> Is there a way to do that with psql?
>
>    You mean like:
> $ psql --user=foobar --password=boofar < script.sql

   Silly me -- I read the manual page too fast. --password or -W doesn't
take an argument. It just tells the client that you want to enter a
password. This makes since, since passing a password is bad for security.

   I guess you're stuck using .pgpass, which is a better solution anyway.


--
Kind regards,
Jan Danielsson



Attachment

pgsql-novice by date:

Previous
From: "Neil Aggarwal"
Date:
Subject: Re: Pass password in scripts?
Next
From: Tim Bowden
Date:
Subject: Re: install on ubuntu