From: | merlyn(at)stonehenge(dot)com (Randal L(dot) Schwartz) |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | DBD::Pg - BYTEA - fails for range outside chr(0)-chr(127) |
Date: | 2001-06-27 15:50:31 |
Message-ID: | m1lmmdq5vc.fsf@halfdome.holdit.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
[Note, I'm not a member of this list (yet :), so cc me on any responses.
I posted this to the Perl-dbi list and they suggest I take it here.]
I'm getting core dumps when I try to use a BYTEA value with
a byte outside 0..127.
use DBI qw(SQL_BINARY);
my $dbh = DBI->connect("dbi:Pg:dbname=merlyntest", "user", "pass",
{ RaiseError => 1 });
$dbh->do("CREATE TABLE test (a BYTEA)");
my $insert = $dbh->prepare("INSERT INTO test VALUES (?)");
$insert->bind_param(1, undef, SQL_BINARY); # necessary for BYTEA escaping
$insert->execute("fred"); # works fine
$insert->execute(pack "C*", 0..127); # works fine
$insert->execute(pack "C*", 128); # BOMB, core dump
(I'm cutting and pasting this from a perl debugger session, so if
that's not quite it, forgive me.)
DBI version 1.18
DBD::Pg version 1.00
postgresql version 7.1.2
Perl version 5.5.3
Is it just me? Am I not holding my mouth right?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn(at)stonehenge(dot)com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
From | Date | Subject | |
---|---|---|---|
Next Message | Jeffrey Silberberg | 2001-06-27 15:53:11 | Relationship Issue PGSQL --> Access/97 |
Previous Message | Thalis A. Kalfigopoulos | 2001-06-27 15:36:40 | Re: A way of storing variables - will this work? |