Re: another plperl bug - Mailing list pgsql-hackers

From Tom Lane
Subject Re: another plperl bug
Date
Msg-id 16356.1101142316@sss.pgh.pa.us
Whole thread Raw
In response to another plperl bug  ("Andrew Dunstan" <andrew@dunslane.net>)
List pgsql-hackers
"Andrew Dunstan" <andrew@dunslane.net> writes:
> I discovered a further plperl bug last night. If foo() is a SRF and
> therefore returns an arrayref, calling select foo() rather than select *
> from foo() causes a segfault because this line passes NULL as the argument:

>     tupdesc = CreateTupleDescCopy(rsinfo->expectedDesc);

> I am not sure I even know what the behaviour should be, and my available
> time to work on a fix is severely contrained ATM.

It should do the same as plpgsql: throw an error about "set-returning
function called in a context that cannot accept a set", or however that
was phrased.  I'll put in a fix.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: Beta5 now Available
Next
From: David Fetter
Date:
Subject: Re: Beta5 now Available