"Command Prompt, Inc." <pgsql-general(at)commandprompt(dot)com> writes:
> ... how exactly does PL/pgSQL manage the memory it requires for
> calls to functions and operators?
7.1 and before leak like a sieve :-(, at least for the duration of a
single function call.
> Also, does 7.2's version of PL/pgSQL behave the same way?
7.2 should be much better, though I am too lazy to try your specific
example right now. If you still see leakage under 7.2 please report it
and we'll try to fix it.
regards, tom lane