Re: Function result cacheing - any comments? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Function result cacheing - any comments?
Date
Msg-id 6765.1029767615@sss.pgh.pa.us
Whole thread Raw
In response to Re: Function result cacheing - any comments?  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> At 15:41 19/08/2002 +0800, Christopher Kings-Lynne wrote:
>> So it seems Philip already has what he wants?

> I really hope so, but my understanding is that this information is used 
> during optimization, not execution; I want it to be used in execution.

Philip is correct that there is no cacheing of the sort he wants.

The existing volatility classifications are somewhat relevant in the
sense that an IMMUTABLE or STABLE function would be legal to cache the
way he wants ... but the system doesn't do so, it only uses these
classifications to drive before-the-query constant folding and decisions
about whether indexscans are safe.

I would resist any attempt to install cacheing by default for immutable
or stable functions.  Philip was proposing that function authors would
have to explicitly ask for cacheing (ie, add another function property)
and that seems a necessary component of an acceptable solution IMHO.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas SB SD"
Date:
Subject: Re: Inheritance
Next
From: Curt Sampson
Date:
Subject: Re: Inheritance