Peter wrote:
> On Fri, Mar 23, 2018 at 10:14:19AM -0400, Tom Lane wrote:
>
> ! It's conceivable that the OP's problem is actually planning time
> ! (if the query joins sufficiently many tables) and that restricting
> ! the cost of the join plan search is really what he needs to do.
>
> Negative.
Peter wrote:
> Given an arbitrary function fn(x) returning numeric.
>
> Question: how often is the function executed?
> [...]
> C.
> select v.v,v.v from (select fn('const') as v) as v;
>
> Answer:
> Once if declared VOLATILE.
> Twice if declared STABLE.
>
> Now this IS a surprize. It is clear th