Skip Menu |

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

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

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

Bug Information
Severity: Normal
Broken in: 1.32
Fixed in: 1.40



Subject: from gborg: digit after '\x81\x5c' is lost.
[this bug has been migrated from Gborg. An additional note is below. ] Environment: OS Red Hat Linux release 8.0 perl 5.8.0 DBI 1.37 DBD::Pg 1.32 Created By: makoto@cpan.org Description: sample script: BEGIN{$ENV{PGCLIENTENCODING}='sjis'} use strict; use warnings; use DBI; my $str = "1\x81\x5c5"; #"1\x81\x5c5"= 1[dable byte dash of Shift_JIS]5 my $dbh = DBI->connect('dbi:Pg:dbname=makoto','makoto',undef,{ AutoCommit => 0, PrintError => 1, RaiseError => 1, ShowErrorStatement => 1, }); $dbh->trace(1); my $sth = $dbh->prepare("insert into test values(?)"); print "execute:" , ( $sth->execute($str) ? 'OK' : 'NG' ) , "\n"; $dbh->commit; $dbh->disconnect; 1; trace output: $ createdb -EEUC_JP makoto CREATE DATABASE $ PGCLIENTENCODING=EUC_JP psql makoto=> create table test(a text); CREATE makoto=> \q $ perl test.pl DBI::db=HASH(0x81aa334) trace level set to 1 in DBI 1.37-ithread dbd_st_prepare: statement = >insert into test values(?)< dbd_st_preparse: statement = >insert into test values(?)< <- prepare('insert into test values(?)')= DBI::st=HASH(0x81aa43c) at test.pl line 14 dbd_bind_ph dbd_st_rebind dbd_st_execute <- execute('1.\5')= 1 at test.pl line 15 execute:OK dbd_db_commit <- commit= 1 at test.pl line 16 dbd_db_disconnect <- disconnect= 1 at test.pl line 17 dbd_st_destroy <- DESTROY= undef dbd_db_destroy <- DESTROY= undef $ PGCLIENTENCODING=EUC_JP psql makoto=> select * from test; a ------ 1\ (1 row) ############## This bug needs to be tested against current CVS. Could you do that to help us? I've created a snapshot to make this easier: http://mark.stosberg.com/perl/DBD-Pg-cvs-2004-09-24.tgz
Please let us know if this is fixed in 1.40_1: http://search.cpan.org/~dbdpg/DBD-Pg-1.40_1/ or direct link to a download: http://search.cpan.org/CPAN/authors/id/D/DB/DBDPG/DBD-Pg-1.40_1.tar.gz Thanks! [guest - Fri Sep 24 22:18:57 2004]: Show quoted text
> [this bug has been migrated from Gborg. An additional note is
below. ] Show quoted text
> > Environment: > > OS Red Hat Linux release 8.0 > perl 5.8.0 > DBI 1.37 > DBD::Pg 1.32 > > Created By: makoto@cpan.org > Description: > > sample script: > BEGIN{$ENV{PGCLIENTENCODING}='sjis'} > use strict; > use warnings; > use DBI; > my $str = "1\x81\x5c5"; > #"1\x81\x5c5"= 1[dable byte dash of Shift_JIS]5 > my $dbh = DBI->connect('dbi:Pg:dbname=makoto','makoto',undef,{ > AutoCommit => 0, > PrintError => 1, > RaiseError => 1, > ShowErrorStatement => 1, > }); > $dbh->trace(1); > my $sth = $dbh->prepare("insert into test values(?)"); > print "execute:" , ( $sth->execute($str) ? 'OK' : 'NG' ) , "\n"; > $dbh->commit; > $dbh->disconnect; > 1; > > > trace output: > $ createdb -EEUC_JP makoto > CREATE DATABASE > $ PGCLIENTENCODING=EUC_JP psql > makoto=> create table test(a text); > CREATE > makoto=> \q > $ perl test.pl > DBI::db=HASH(0x81aa334) trace level set to 1 in DBI 1.37-ithread > dbd_st_prepare: statement = >insert into test values(?)< > dbd_st_preparse: statement = >insert into test values(?)< > <- prepare('insert into test values(?)')=
DBI::st=HASH(0x81aa43c) Show quoted text
> at test.pl > line 14 > dbd_bind_ph > dbd_st_rebind > dbd_st_execute > <- execute('1.\5')= 1 at test.pl line 15 > execute:OK > dbd_db_commit > <- commit= 1 at test.pl line 16 > dbd_db_disconnect > <- disconnect= 1 at test.pl line 17 > dbd_st_destroy > <- DESTROY= undef > dbd_db_destroy > <- DESTROY= undef > $ PGCLIENTENCODING=EUC_JP psql > makoto=> select * from test; > a > ------ > 1\ > (1 row) > > ############## > > This bug needs to be tested against current CVS. Could you do that
to Show quoted text
> help us? I've created a snapshot to make this easier: > http://mark.stosberg.com/perl/DBD-Pg-cvs-2004-09-24.tgz > >
From: Ivan Kohler
Please let us know if this is fixed in 1.40_1: http://search.cpan.org/~dbdpg/DBD-Pg-1.40_1/ or direct link to a download: http://search.cpan.org/CPAN/authors/id/D/DB/DBDPG/DBD-Pg-1.40_1.tar.gz Thanks! [guest - Fri Sep 24 22:18:57 2004]: Show quoted text
> [this bug has been migrated from Gborg. An additional note is
below. ] Show quoted text
> > Environment: > > OS Red Hat Linux release 8.0 > perl 5.8.0 > DBI 1.37 > DBD::Pg 1.32 > > Created By: makoto@cpan.org > Description: > > sample script: > BEGIN{$ENV{PGCLIENTENCODING}='sjis'} > use strict; > use warnings; > use DBI; > my $str = "1\x81\x5c5"; > #"1\x81\x5c5"= 1[dable byte dash of Shift_JIS]5 > my $dbh = DBI->connect('dbi:Pg:dbname=makoto','makoto',undef,{ > AutoCommit => 0, > PrintError => 1, > RaiseError => 1, > ShowErrorStatement => 1, > }); > $dbh->trace(1); > my $sth = $dbh->prepare("insert into test values(?)"); > print "execute:" , ( $sth->execute($str) ? 'OK' : 'NG' ) , "\n"; > $dbh->commit; > $dbh->disconnect; > 1; > > > trace output: > $ createdb -EEUC_JP makoto > CREATE DATABASE > $ PGCLIENTENCODING=EUC_JP psql > makoto=> create table test(a text); > CREATE > makoto=> \q > $ perl test.pl > DBI::db=HASH(0x81aa334) trace level set to 1 in DBI 1.37-ithread > dbd_st_prepare: statement = >insert into test values(?)< > dbd_st_preparse: statement = >insert into test values(?)< > <- prepare('insert into test values(?)')=
DBI::st=HASH(0x81aa43c) Show quoted text
> at test.pl > line 14 > dbd_bind_ph > dbd_st_rebind > dbd_st_execute > <- execute('1.\5')= 1 at test.pl line 15 > execute:OK > dbd_db_commit > <- commit= 1 at test.pl line 16 > dbd_db_disconnect > <- disconnect= 1 at test.pl line 17 > dbd_st_destroy > <- DESTROY= undef > dbd_db_destroy > <- DESTROY= undef > $ PGCLIENTENCODING=EUC_JP psql > makoto=> select * from test; > a > ------ > 1\ > (1 row) > > ############## > > This bug needs to be tested against current CVS. Could you do that
to Show quoted text
> help us? I've created a snapshot to make this easier: > http://mark.stosberg.com/perl/DBD-Pg-cvs-2004-09-24.tgz > >