digoal(at)126(dot)com writes:
> Why stable function in select clause cann't optimized to one time call?
Because its value might change between planning and execution.
There was some discussion awhile back of performing run-time caching of
the result, but it isn't done yet, and would impose some costs of its own.
BTW, this sort of question is not a bug.
regards, tom lane