Skip site navigation (1) Skip section navigation (2)

DBD::Pg and .pgpass

From: Brian Trammell <bht(at)cert(dot)org>
To: psql-interfaces(at)postgresql(dot)org
Subject: DBD::Pg and .pgpass
Date: 2005-04-13 19:04:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-interfaces

I'm trying to run a Perl script connecting to a PostgreSQL database via 
DBI and DBD::Pg as a cron job. I'm already using the .pgpass mechanism 
for managing md5 passwords on the client side and would like to use the 
same mechanism for connecting from the Perl script. This does not, 
however, appear to work. Passing either "" or undef for the password 
yields "no password supplied at <script> line <line>".

Though I could (and probably will, as I'm under some time pressure 
here) easily hack in a .pgpass parser to the Perl script, this strikes 
me as unconscionably inelegant. Is there some magic I'm missing to get 
DBD::Pg to play nice with .pgpass, or is this a bug in DBD::Pg (1.21) 
or the Postgres (8.0.1) client side itself?



Brian H. Trammell / MTS, CERT/NetSA / <bht(at)cert(dot)org> / 412.268.9748


pgsql-hackers by date

Next:From: Jim C. NasbyDate: 2005-04-13 19:43:03
Subject: Re: System vs non-system casts
Previous:From: Josh BerkusDate: 2005-04-13 18:35:36
Subject: Re: PLM pulling from CVS nightly for testing in STP

pgsql-interfaces by date

Next:From: Noureddine teznitiDate: 2005-04-14 11:58:42
Subject: Error in PG installation
Previous:From: Greg Sabino MullaneDate: 2005-04-13 02:00:34
Subject: Re: How to retrieve how many rows are affected after doing an INSERT statement

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group