Hi,
I came across this problem that seems to be with DBD::Pg's quote
function that is easily reproducible. This test script:
my $dbh = DBI->connect("DBI:Pg:dbname=test", "postgres", "");
my $val = $dbh->quote(q!\'?:!);
print "val: $val\n";
my $sth = $dbh->prepare("INSERT INTO foo (a) values ($val)");
$sth->execute;
produces:
DBD::Pg::st execute failed: parameter unknown at mytest.pl line 6.
If I use mysql, or Oracle, as a driver, it works as expected. I searched
through the list, and the only answer seemed to be to use placeholders,
which isn't really an option in my situation.
Any ideas on workarounds, or a patch to DBD::Pg would be great.
Please cc me any replies as I'm not on the list.
Cheers,
Alex