This appears by a non-intuitive problem for people. Below I assume that you are using some version of ActivePerl for Windows (5.8 or 5.10). First of all:
Under no circumstances (ok, I rephrase: only under extreme circumstances) should you use DBD::PgPP. It is old, not very performant (given that its implemented in
Pure Perl) and has some nontrivial bugs. An example for one such bug is the following:
my $sth = $dbh->prepare('SELECT foo FROM bar WHERE baz = ? AND fuzz = ?'); $sth->execute('a?b', 'c');
With PgPP the actual query it will try to execute will be something like:
SELECT foo FROM bar WHERE baz = a'c'b AND fuzz = ?. I assume that what it does is that it takes the parameters provided to execute one by one and looks for the first question mark in the query. But given that the first parameter itself contains a question mark, the method fails...
So how do you install DBD::Pg if there aren't in the ActiveState PPM repositories?
- Go to the dbdpgppm project on pgfoundry
- Download the correct PPD file for your needs (depending on the Perl version - 5.6, 5.8 or 5.10 - and if you need SSL support or not)
- Issue the following command:
ppm install the_downloaded.ppd