Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> Hmm. Have you tried this with recursive plpgsql functions? I have a
>> feeling that that little hack of replacing the flinfo link isn't gonna
>> work well in plpgsql, because of its caching of query plans.
> I don't understand what specific problem you are referring to.
After further thought I believe that the problem cannot occur until we
have plpgsql functions that can return sets (and even then it could be
worked around if exec_eval_simple_expr isn't used for functions
returning sets, which it probably couldn't be anyway).
ExecMakeFunctionResult only keeps call state in the plan tree for
set-valued functions, so the recursive re-use of the plan tree doesn't
matter otherwise.
Just chalk it up as another bit of messiness that we need to fix
someday.
regards, tom lane