Hi all.
I recently upgraded my
PostgreSQL install to version 8.2.6 (win32). After doing so, I installed the following modules (
DBI was installed previously).
When attempting to connect to a database with
DBD::Pg, the connection hung and only by pressing Ctrl-C was I able to terminate the program.
Assuming something might be wrong with the module, I tried
DBD::PgPP in a very simple test script (please see below):
#!/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";
}
After doing so, I immediately noticed the following message:
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.p
+l line 5
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.
Thanks,
~Katie
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.