Skip Menu |

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

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

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

Bug Information
Severity: Important
Broken in: 2.0.0
Fixed in: 2.9.2



Subject: Empty Postgres arrays not mapping to undef
Reported by Alex Cheshev on the DBI mailing list. $dbh->do("CREATE TABLE uno (dos integer[] DEFAULT '{}')"); $dbh->do("INSERT INTO uno DEFAULT VALUES"); $sth = $dbh->prepare("SELECT dos FROM uno"); $sth->execute(); print Dumper $sth->fetchall_arrayref(); Expected: $VAR1 = [ [ [ undef ] ] ]; Actual: Argument "" isn't numeric in subroutine entry... $VAR1 = [ [ [ 0 ] ] ];
Fixed in subversion r11656, and will be part of version 2.9.1
Subject: Re: [rt.cpan.org #38552] Empty Postgres arrays not mapping to undef
Date: Sun, 17 Aug 2008 21:37:36 -0700
To: bug-DBD-Pg [...] rt.cpan.org
From: "David E. Wheeler" <david [...] kineticode.com>
On Aug 17, 2008, at 20:01, Greg Sabino Mullane via RT wrote: Show quoted text
> Reported by Alex Cheshev on the DBI mailing list. > > $dbh->do("CREATE TABLE uno (dos integer[] DEFAULT '{}')"); > $dbh->do("INSERT INTO uno DEFAULT VALUES"); > $sth = $dbh->prepare("SELECT dos FROM uno"); > $sth->execute(); > print Dumper $sth->fetchall_arrayref(); > > Expected: > $VAR1 = [ > [ > [ > undef > ] > ] > ];
I'm confused. Why wouldn't the expected be [[[]]]? What's with the undef? Best, David
Subject: Re: [rt.cpan.org #38552] Empty Postgres arrays not mapping to undef
Date: Mon, 18 Aug 2008 13:32:50 -0000
To: bug-DBD-Pg [...] rt.cpan.org
From: "Greg Sabino Mullane" <greg [...] turnstep.com>
-----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Show quoted text
> I'm confused. Why wouldn't the expected be [[[]]]? What's with the > undef?
Er..not sure? Better than the '0' it used to be, anyway! I'll get it back to an empty array, guess my brain was still on vacation. Thanks! - -- Greg Sabino Mullane greg@turnstep.com End Point Corporation PGP Key: 0x14964AC8 200808180931 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iEYEAREDAAYFAkipedUACgkQvJuQZxSWSshohwCg2B8rOS68yQHTbrsLAIOhXSb8 nD0AoO1r4N2ZtTXAYAF+8Dhh4jonqW5G =NLY1 -----END PGP SIGNATURE-----