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;