Skip Menu |

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

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

People
Owner: greg [...] turnstep.com
Requestors: mrj [...] nandu.ru
Cc:
AdminCc:

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



Subject: Strange backslash quoting with arrays DBD::Pg 2.13.1
Date: Tue, 26 May 2009 20:01:43 +0400
To: bug-DBD-Pg [...] rt.cpan.org
From: Роман Маширов <mrj [...] nandu.ru>
Hi! Strange results got while quoting string with backslash in array: print STDERR $DBD::Pg::VERSION, "\n"; my $a = '\d'; print STDERR $a, "\n"; print STDERR $dbh->quote($a), "\n"; print STDERR $dbh->quote([$a]), "\n"; Got: 2.13.1 \d E'\\d' {"\\\d"} The last result seems strange, since it contains unbalanced backslash: update abonent set field_value='{"\\\d"}' where abonent_id=531329; UPDATE 1 select field_value from abonent where abonent_id=531329; field_value ------------- {d} It seems to me that $dbh->quote([$a]) should return {"\\\\d"} instead of {"\\\d"} Thank you beforehand -- MRJ
Proposed fix is in r13042, please try it out if you can. http://svn.perl.org/modules/DBD-Pg/trunk/