Re: arrays as pl/perl input arguments [PATCH]

From: Alex Hunsaker <badalex(at)gmail(dot)com>
To: Alexey Klyukin <alexk(at)commandprompt(dot)com>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: arrays as pl/perl input arguments [PATCH]
Date: 2011-01-26 22:44:05
Message-ID: AANLkTikQJC86uS+1Qs7f4mg7+H4Sd_ZF+b7EQq-QcqQs@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 26, 2011 at 13:35, Alexey Klyukin <alexk(at)commandprompt(dot)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)$/;

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-01-26 22:47:10 Re: Re: [COMMITTERS] pgsql: Get rid of the global variable holding the error state
Previous Message Peter Eisentraut 2011-01-26 22:42:55 Re: [COMMITTERS] pgsql: Get rid of the global variable holding the error state