Re: arrays as pl/perl input arguments [PATCH] - Mailing list pgsql-hackers

From Alex Hunsaker
Subject Re: arrays as pl/perl input arguments [PATCH]
Date
Msg-id AANLkTikQJC86uS+1Qs7f4mg7+H4Sd_ZF+b7EQq-QcqQs@mail.gmail.com
Whole thread Raw
In response to Re: arrays as pl/perl input arguments [PATCH]  (Alexey Klyukin <alexk@commandprompt.com>)
List pgsql-hackers
On Wed, Jan 26, 2011 at 13:35, Alexey Klyukin <alexk@commandprompt.com> wrote:
>
> On Jan 26, 2011, at 10:08 PM, Alex Hunsaker wrote:
>>>  (it's obviously reversed comparing with the original one), but it still segfaults after I fixed that.

Ahh yep, the reason reversing the check did not fix it is order of
operations. I had this fixed, but I had some unrelated changes in my
tree. So I manually git add(ed) the plperl files so I could use git
diff --cached to make the diff.  Then I fixed this issue, but forgot
to git-add the changes :(.  That explains why make installcheck worked
for me, but the diff I made was broken.

If you add some parens around ref it should work:
....       if ref($arg) !~ /ARRAY/;

btw the next version I plan on posting will check more explicitly:       if ref($arg) !~
/^(?:ARRAY|PostgreSQL::InServer::ARRAY)$/;


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [COMMITTERS] pgsql: Get rid of the global variable holding the error state
Next
From: Tom Lane
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Get rid of the global variable holding the error state