Re: BUG #10194: Stable function in select clause cann't be optimized to one call? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #10194: Stable function in select clause cann't be optimized to one call?
Date
Msg-id 4618.1398973036@sss.pgh.pa.us
Whole thread Raw
In response to BUG #10194: Stable function in select clause cann't be optimized to one call?  (digoal@126.com)
Responses Re: BUG #10194: Stable function in select clause cann't be optimized to one call?  (德哥 <digoal@126.com>)
List pgsql-bugs
digoal@126.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

pgsql-bugs by date:

Previous
From: Nick Rupley
Date:
Subject: Re: BUG #10189: Limit in 9.3.4 no longer works when ordering using a composite multi-type index
Next
From: 德哥
Date:
Subject: Re: BUG #10194: Stable function in select clause cann't be optimized to one call?