Subject: | One Element is added when Empty array is selected |
Repro version
Linux hostname 2.6.28.2-pdc #15 SMP PREEMPT Wed Jan 28 00:55:39 HKT 2009
x86_64 GNU/Linux
Perl v5.8.8
DBI 1.607
DBD::Pg 2.011008
use DBI;
use Data::Dumper;
$dbh = DBI->connect('dbi:Pg',...,...);
print Dumper $dbh->selectall_arrayref(q{SELECT array(SELECT 12345::int
WHERE 1=0)::int[]});
print Dumper $dbh->selectall_arrayref(q{SELECT array(SELECT
'empty'::text WHERE 1=0)::text[]});
The result should be [] and [], but instead it produces [0] and ['']