Skip Menu |

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 9124
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: Nobody in particular
Requestors: SAMV [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: bytea columns not escaped correctly.
I'm using placeholders in my DBI queries. At the moment, I can't easily use $dbi->bind_param() to explicitly mark the placeholder column as the correct type (if that is indeed what is required). The example code that breaks is attached.
use DBI; $dbh = DBI->connect('dbi:Pg:dbname=mydb', "user", "password") or die $DBI::errstr; $dbh->do( << "SQL"); CREATE TABLE foo ( foo BYTEA ) SQL my $sth = $dbh->prepare("update foo set foo=?") or die $DBI::errstr; $sth->execute("Hello There") or die $DBI::errstr; $sth->execute("Hello There\\"); or die $DBI::errstr; $dbh->disconnect;