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