|Don't ask to ask, just ask|
Re: Trouble Connecting to PostgreSQL with DBD::Pgby erix (Vicar)
|on Nov 14, 2010 at 17:40 UTC||Need Help??|
I know it works
You can only conclude that it works from the server itself. Is your perl program also running & connecting from the server?
Your code works for me. That means probably that you have to tweak your pg_hba.conf:
Pg authentication docs (NOTE: change '/current/' to whatever pg version you use; 'current' means Pg version 9.0 - and yes, it has changed).
Oh wait, I see you have 8.4, so here: 8.4 Pg authentication docs
Keep in mind that the first matching line (in pg_hba.conf) will be used.
irc freenode #postgresql is often the quickest way to get postgres database problems solved, or at least, discussed. The DBD:Pg author(s) are often there too.
UPDATE: if you leave the $dsn 'host=' param away, connection will be done via unix sockets (as opposed to tcp/ip).