Peter Eisentraut <peter_e@gmx.net> writes:
> I've prepared a patch for recursive SQL functions. I assume these memory
> leaks "and so forth" that you speak of are just issues of quality, not
> something that should prevent the use of recursive functions altogether.
I suspect it would not work to re-use a query plan tree at multiple
recursion levels (someday, plan trees should be read-only during
execution, but they ain't now). As long as you are making a new
plan tree for each recursive entry, it should work ...
regards, tom lane