[Devel] Re: PW on posgres script
Michael Ulitskiy
mdu113 at acedsl.com
Mon Dec 19 23:11:29 CET 2005
As far as I know this is not true.
username and passwords can be supplied to postgres via environment
variables: PGUSER and PGPASSWORD
Michael
On Friday 16 December 2005 03:06 am, 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
>
> _______________________________________________
> Devel mailing list
> Devel at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/devel
>
More information about the Devel
mailing list