perlquestion
DigitalKitty
Hi all.
<br />
<br />
I recently upgraded my [http://www.postgresql.org|PostgreSQL] install to version 8.2.6 (win32). After doing so, I installed the following modules ([cpan://DBI] was installed previously).
<br />
<ul>
<li>[cpan://DBD::Pg]</li>
<li>[cpan://DBD::PgPP]</li>
</ul>
<br />
<br />
When attempting to connect to a database with [cpan://DBD::Pg], the connection hung and only by pressing Ctrl-C was I able to terminate the program.
<br />
<br />
Assuming something might be wrong with the module, I tried [cpan://DBD::PgPP] in a very simple test script (please see below):
<br />
<code>
#!/usr/bin/perl
use warnings;
use strict;
use DBI;
my $db = DBI->connect('dbi:PgPP:testdb', 'postgres', 'xxxxxxxxx');
if( $db ) {
print "Connected!\n";
}
else {
print "Nope. Sorry.\n";
}
</code>
<br />
<br />
After doing so, I immediately noticed the following message:
<br />
<code>
C:\Perl2\bin>perl test_pg.pl
DBI connect('testdb','postgres',...) failed: Couldn't connect to /tmp/.s.PGSQL.5432: at C:/Perl2/site/lib/DBD/PgPP.pm line 124 at test_pg.pl line 5
</code>
<br />
Is there a configuration setting I need to modify? For testing purposes, I was able to connect to the database with both python and ruby.
<br />
<br />
Thanks,
<br />
<br />
~Katie