Holger Krug <hkrug@rationalizer.com> writes:
>> [ thinks ... ] It might be unnecessary. I'm not convinced that the
>> per-query context would always be the active one when ExecRelCheck is
>> called, however. There are various per-tuple contexts that might be
>> used as well.
> I think, there aren't,
Right now, it might well be the case that ExecRelCheck is always called
in the per-query context. The point I was trying to make is that I'd
like to change the code so that we don't run so much code with current
context set to per-query context; at which point ExecRelCheck will fail
if it hasn't got that MemoryContextSwitchTo. So, yeah, it's work in
progress.
regards, tom lane