Re: possible memory leak with SRFs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: possible memory leak with SRFs
Date
Msg-id 13112.1273244944@sss.pgh.pa.us
Whole thread Raw
In response to Re: possible memory leak with SRFs  (Nikhil Sontakke <nikhil.sontakke@enterprisedb.com>)
Responses Re: possible memory leak with SRFs
List pgsql-hackers
Nikhil Sontakke <nikhil.sontakke@enterprisedb.com> writes:
>> Consider
>> � � � �srf(foo(col))
>> where foo returns a pass-by-reference datatype.

> Yeah this is my basic confusion. But wouldn't the arguments be
> evaluated afresh on the subsequent call for this SRF?

No, see ExecMakeFunctionResult().  If we did that we'd have serious
problems with volatile functions, ie srf(random()).
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: no universally correct setting for fsync
Next
From: Tom Lane
Date:
Subject: Re: beta to release