Hi,
>> Can someone please explain why we do not reset the expression context
>> if an SRF is involved during execution?
>
> Consider
> srf(foo(col))
> where foo returns a pass-by-reference datatype. Your proposed patch
> would cut the knees out from under argument values that the SRF could
> reasonably expect to still be there on subsequent calls.
>
Yeah this is my basic confusion. But wouldn't the arguments be
evaluated afresh on the subsequent call for this SRF? In that case
freeing up the context of the *last* call should not be an issue I
would think.
And if this is indeed the case we should be using a different longer
lived context and not the ecxt_per_tuple_memory context..
Regards,
Nikhils
--
http://www.enterprisedb.com