Tom Lane writes:
> But I wonder whether any better answer is possible. I don't want to
> give up on the inlining optimization --- anyone see another fix?
If a functional index applies to the function, generate one plan with the
function inlined and one with the function call left in, and then plan
away as usual. While that could blow up the number of plan choices to
consider (which would have to be controlled in some way), this would give
the best end results because the planner could consider the choice knowing
what the function results are used for.
--
Peter Eisentraut peter_e@gmx.net