> Tom Lane wrote:
>> [ scratches head ... ] Right at the moment I don't see where
>> ShutdownExprContext gets called during a ReScan operation. I'm quite
>> sure it once was ... there may be another bug here ...
After further looking I've realized that memory is misserving me here;
having ReScan call ShutdownExprContext was not something that ever got
done. Instead I have an entry on my personal todo list that says
: Need to invent ExprContextRescan and call it at appropriate places.
: Knowing where all the econtexts are seems like the hard part ... though
: maybe we only care about econtexts that might contain set-returning
: functions, which might limit it to the targetlist...
A perfectly clean solution would require being careful to reset *all*
econtexts, which might be thought rather a lot of work to support a
feature that's eventually going to be deprecated anyway (viz, SRFs
outside of FROM). I'll see about the tlist-only case though.
regards, tom lane