Thomas Hallgren <thhal(at)mailblocks(dot)com> writes:
> It's my PL/Java test framework that fails so it's a bit complex but if
> I'm right, any immutable, set-returning function that allocates stuff in
> multi_call_memory_context at first call and then reused it, should show
> the same problem.
Well, you're not right, because nearly every SRF we have does that.
My thought is that there is something specific to the query you are
using that is a contributing factor...
regards, tom lane