public inbox for [email protected]
help / color / mirror / Atom feedFrom: Victor Dobrovolsky <[email protected]>
To: [email protected]
Subject: scalar plpgsql functions and their stability flags
Date: Sun, 26 May 2024 16:20:10 +0300
Message-ID: <CAJFsatN_5EkCuk8GqUG_1iOD0ON6x4BTeMWU08Jierr5m+GD7Q@mail.gmail.com> (raw)
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, or at least once per query.
But it is unclear for me what exactly should/can happens when parameters
are bounded not to constant values but to query fields.
In such a case there could be some caching mechanics involved for
parameters combinations and result values.
Like building a hash table for that or something similar.
Can someone give me guidance on this matter.
What limits the usefulness of such a mechanism, if it exists.
Thank you.
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: scalar plpgsql functions and their stability flags
In-Reply-To: <CAJFsatN_5EkCuk8GqUG_1iOD0ON6x4BTeMWU08Jierr5m+GD7Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox