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

From 德哥
Subject Re: BUG #10194: Stable function in select clause cann't be optimized to one call?
Date
Msg-id 76b7e55f.4fb0.145ba47aa11.Coremail.digoal@126.com
Whole thread Raw
In response to Re: BUG #10194: Stable function in select clause cann't be optimized to one call?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
HI, 
>Because its value might change between planning and execution.
When in seqscan mode, stable function not be optimized to one-call .
But in index-scan mode, it's in one-call mode.
If its value might change between planning and execution. I think stable function also not allowed used in index scan mode.




--
公益是一辈子的事,I'm Digoal,Just Do It.


At 2014-05-02 03:37:16,"Tom Lane" <tgl@sss.pgh.pa.us> wrote: >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: Tom Lane
Date:
Subject: Re: BUG #10194: Stable function in select clause cann't be optimized to one call?
Next
From: Nick Rupley
Date:
Subject: Re: BUG #10189: Limit in 9.3.4 no longer works when ordering using a composite multi-type index