Re: ERROR: Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/site_perl/5.8.8/Test/Parser/Dbt2.pm line 521. - Mailing list pgsql-performance

From Rajesh Kumar Mallah
Subject Re: ERROR: Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/site_perl/5.8.8/Test/Parser/Dbt2.pm line 521.
Date
Msg-id a97c77030902100636p44eb3a83occ1efdf672e8d5f8@mail.gmail.com
Whole thread Raw
In response to ERROR: Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/site_perl/5.8.8/Test/Parser/Dbt2.pm line 521.  (Rohan Pethkar <rohanpethkar@gmail.com>)
List pgsql-performance
> Can't use an undefined value as an ARRAY reference at
> /usr/lib/perl5/site_perl/5.8.8/Test/Parser/Dbt2.pm line 521.
>
> Can someone please give inputs to resolve this issue? Any help on this will
> be appreciated.

519 sub transactions {
520     my $self = shift;
521     return @{$self->{data}->{transactions}->{transaction}};
522 }

the stuff in $self->{data}->{transactions}->{transaction} is not defined
so it cannot be dereferenced. If you want to just escape this error you
may modify the code as:

if ($self->{data}->{transactions}->{transaction}) {
return @{$self->{data}->{transactions}->{transaction}};
} else {
   return ();
}

however understanding the root cause is recommended.

>
> Thanks in advance.
>
> Thanks,
> Rohan
>

pgsql-performance by date:

Previous
From: Rajesh Kumar Mallah
Date:
Subject: Re: query becomes fas on 'SET enable_hashjoin TO off;'
Next
From: "Kevin Grittner"
Date:
Subject: Re: query slow only after reboot