Bug in DBD::Pg 1.32 with bytea columns
From: Sam Vilain (sam_at_vilain.net)
Date: 12/23/04
- Previous message: Lincoln A. Baxter: "[Fwd: DBD::Oracle and CLOB insert]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Dec 2004 20:47:59 +1300 To: Dbi-Users <dbi-users@perl.org>
"\" characters in bytea columns are not being escaped correctly;
--- |-
use DBI;
$dbh = DBI->connect('dbi:Pg:dbname=tangram', "samv", "") 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;
...
The error message is:
DBD::Pg::st execute failed: ERROR: invalid input syntax for type bytea
at test.pl line 18.
ERROR: invalid input syntax for type bytea at test.pl line 18.
Is this going to be possible to fix in the DBD driver without using
bind_param?
I'm on Pg 7.4.3
-- Sam Vilain, sam /\T vilain |><>T net, PGP key ID: 0x05B52F13 (include my PGP key ID in personal replies to avoid spam filtering)
- Previous message: Lincoln A. Baxter: "[Fwd: DBD::Oracle and CLOB insert]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]