"Chris Knight" <[EMAIL PROTECTED]> writes: > I've found I've had to do a lot of plpgsql rewriting to avoid memory > exhaustion due to calling the functions multiple times in the one session. I believe this has probably been fixed already by the memory context changes I've been working on --- I think that space allocated in PL functions will now be reclaimed once per tuple not once per query. Would you mind trying your problem cases with a current snapshot? regards, tom lane