Re: plperl returning setof foo[] - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject Re: plperl returning setof foo[]
Date
Msg-id 20090928101609.GA12979@toroid.org
Whole thread Raw
In response to plperl returning setof foo[]  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: plperl returning setof foo[]
List pgsql-hackers
At 2009-09-12 13:17:50 -0400, andrew@dunslane.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

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Rejecting weak passwords
Next
From: Robert Haas
Date:
Subject: Re: syslog_line_prefix