[Devel] Re: PW on posgres script

Michael Ulitskiy mdu113 at acedsl.com
Wed Dec 21 17:45:41 CET 2005


Hi Klaus,

http://www.postgresql.org/docs/7.4/interactive/libpq-envars.html
It's still there, but doc says it's deprecated in favor of .pgpass.
Nonetheless it works and sometimes I use it. 
But you're right, if something's new is going to be implemented it shouldn't
be based on deprecated features.

Michael


On Tuesday 20 December 2005 04:33 am, Klaus Darilion wrote:
> Hi Michael!
> 
> man pages of psql 7.4.7 mentions PGUSER, but not PGPASSWORD. Maybe this 
> was replaced with the ~/.pgpass file
> 
> regards
> klaus
> 
> Michael Ulitskiy wrote:
> > 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
> >>
> > 
> > 
> > _______________________________________________
> > Devel mailing list
> > Devel at openser.org
> > http://openser.org/cgi-bin/mailman/listinfo/devel
> > 
> > 
> 
> 

-- 
See you later,
                    Michael



More information about the Devel mailing list