Gerardo Herzig <gherzig(at)fmed(dot)uba(dot)ar> writes:
> So, what happens, when a plsql function is excecuted, it takes is own
> enviroment variables, or something like that?
No, but it probably cached a plan from an execution before you changed
join_collapse_limit ...
regards, tom lane