Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> Attached patch is the same logic as before but with more comments.
This looks generally reasonable to me, but what's the point of doing
two MemoryContextReset calls in tfuncFetchRows? Doing one at the
end should be sufficient to guarantee that the context is empty already
at the next call.
Also, I'd be inclined to rename "perValueCxt" to something else,
it's not really correctly named for this usage pattern.
regards, tom lane