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