[Devel] Re: PW on posgres script

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Dec 19 15:39:51 CET 2005


Hi Klaus,

ok- thanks for clarification - this means that all password management 
code should be removed.

regards,
bogdan

Klaus Darilion wrote:

> Bogdan-Andrei Iancu wrote:
>
>> Hi Klaus,
>>
>> when I applied Norman's fix regarding the PW env. variable in 
>> mysqldb.sh, I wanted to update also the postgres script, but I saw it 
>> commented out - any reasons not for providing passwd to postgres? it 
>> will be a nice to be able to pass the password via env. without being 
>> ask.
>
>
> Hi Bogdan!
>
>
> psql works different than mysql. You can not provide the password like 
> it is done for mysql. For automatic login with psql you have to use a 
> .pgpass file in your home directory.
> http://pgsqld.active-venture.com/libpq-files.html
>
> e.g. I have in /home/darilion/.pgpass:
> localhost:*:*:openser:openserrw
> localhost:*:*:openserro:openserro
>
> file access rights must be 0600:
> -rw-------   1 darilion darilion     159 Aug  4 18:07 .pgpass
>
> otherwise psql does not accept the .pgpass file
>
> regards
> klaus
>




More information about the Devel mailing list