Joe Conway <mail@joeconway.com> writes:
> Granted, in retrospect it's a pretty brain-dead thing to do ;-), but it
> seems the system should protect me better from myself.
There's been some past speculation about putting in a function call
nesting depth limit, but I haven't been able to think of any reasonable
way to estimate a safe limit. The stack size limit varies a lot across
different platforms, and the amount of stack space consumed per PL
function call level seems hard to estimate too. We do have a nesting
depth limit for expressions, which is intended specifically to avoid
stack overflow during expression eval --- but the amount of stack chewed
per expression level is relatively small and predictable.
regards, tom lane