diff options
Diffstat (limited to 'src/pl/plperl/expected/plperl_array.out')
-rw-r--r-- | src/pl/plperl/expected/plperl_array.out | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pl/plperl/expected/plperl_array.out b/src/pl/plperl/expected/plperl_array.out index 829733fef4f..efa884b359f 100644 --- a/src/pl/plperl/expected/plperl_array.out +++ b/src/pl/plperl/expected/plperl_array.out @@ -131,7 +131,7 @@ CREATE OR REPLACE FUNCTION plperl_sum_row_elements(rowfoo) RETURNS TEXT AS $$ } else { $result = $row_ref->{bar}; - die "not an array reference".ref ($row_ref->{baz}) + die "not an array reference".ref ($row_ref->{baz}) unless (is_array_ref($row_ref->{baz})); # process a single-dimensional array foreach my $elem (@{$row_ref->{baz}}) { @@ -159,7 +159,7 @@ CREATE OR REPLACE FUNCTION plperl_sum_array_of_rows(rowbar) RETURNS TEXT AS $$ foreach my $row_ref (@{$row_array_ref}) { if (ref $row_ref eq 'HASH') { $result += $row_ref->{bar}; - die "not an array reference".ref ($row_ref->{baz}) + die "not an array reference".ref ($row_ref->{baz}) unless (is_array_ref($row_ref->{baz})); foreach my $elem (@{$row_ref->{baz}}) { $result += $elem unless ref $elem; @@ -177,7 +177,7 @@ CREATE OR REPLACE FUNCTION plperl_sum_array_of_rows(rowbar) RETURNS TEXT AS $$ } return $result; $$ LANGUAGE plperl; -select plperl_sum_array_of_rows(ROW(ARRAY[ROW(1, ARRAY[2,3,4,5,6,7,8,9,10])::rowfoo, +select plperl_sum_array_of_rows(ROW(ARRAY[ROW(1, ARRAY[2,3,4,5,6,7,8,9,10])::rowfoo, ROW(11, ARRAY[12,13,14,15,16,17,18,19,20])::rowfoo])::rowbar); plperl_sum_array_of_rows -------------------------- |