Search Postgresql Archives

Re: Why is my function inlined only when STABLE?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Mar 29, 2022, at 2:24 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
> 
> Philip Semanchuk <philip@xxxxxxxxxxxxxxxxxxxxx> writes:
>> I have a function that isn't being inlined, and I would appreciate help to understand why that's the case. 
> 
> I think the test methodology you used is faulty, because it does not
> distinguish between "inline-able" and "foldable to a constant".
> Given an immutable function applied to constant(s), the planner prefers
> to fold to a constant by just executing the function.  The inline-ing
> transformation is considered only when that case doesn't apply.

Excellent point, thank you. Now I understand. I was trying to write an inlining demo for my colleagues, and I simplified my example one step too far by using a constant.

I really appreciate the help!

Cheers
Philip





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux