Re: plperl returning setof foo[]

From: Abhijit Menon-Sen <ams(at)toroid(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: plperl returning setof foo[]
Date: 2009-09-28 10:16:10
Message-ID: 20090928101609.GA12979@toroid.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 2009-09-12 13:17:50 -0400, andrew(at)dunslane(dot)net wrote:
>
> I have just noticed, somewhat to my chagrin, that while in a plperl
> function that returns an array type you can return a perl arrayref,
> like this:
>
> return [qw(a b c)];
>
> if the function returns a setof an array type you cannot do this:
>
> return_next [qw(a b c)];

Right. This was an unintentional omission on my part.

> The fix is fairly small (see attached) although I need to check with
> some perlguts guru to see if I need to decrement a refcounter here or
> there.

Slightly simpler patch attached (and tested).

-- ams

Attachment Content-Type Size
plperl-arrayfix.diff text/x-diff 638 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-09-28 10:43:32 Re: syslog_line_prefix
Previous Message Magnus Hagander 2009-09-28 10:11:50 Re: Rejecting weak passwords