Re: scalar plpgsql functions and their stability flags

2024-05-26 Thread Tom Lane
Victor Dobrovolsky writes: > It is clear that for immutable/stable functions with constant parameters, > query planner could/should calculate value in a parse time and use it > directly in query, or at least once per query. Immutable, yes, stable, no. Awhile back there was a draft patch to cach

scalar plpgsql functions and their stability flags

2024-05-26 Thread Victor Dobrovolsky
Good day experts... Question on scalar plpgsql functions stability flags (immutable, stable) regarding how it works in sql queries. It is clear that for immutable/stable functions with constant parameters, query planner could/should calculate value in a parse time and use it directly in query, o