Re: "iscachable" functions - Mailing list pgsql-general

From Tom Lane
Subject Re: "iscachable" functions
Date
Msg-id 11570.1045261293@sss.pgh.pa.us
Whole thread Raw
In response to "iscachable" functions  (Eric B.Ridge <ebr@tcdi.com>)
List pgsql-general
"Eric B.Ridge" <ebr@tcdi.com> writes:
> For the "iscachable" parameter of CREATE FUNCTION, the 7.2.x
> documentation states:
>     "Iscachable indicates that the function always returns the same result
> when given the same argument values (i.e., it does not do database
> lookups or otherwise use information not directly present in its
> parameter list). The optimizer uses iscachable to know whether it is
> safe to pre-evaluate a call of the function."

> But where is this cache?

There is no cache, only constant-folding of function calls that are
constants at plan time.

The function attribute name(s) have been changed as of 7.3, to "stable"
and "immutable", partly because people kept thinking that the attribute
name implied that we had a cache.

            regards, tom lane

pgsql-general by date:

Previous
From: Medi Montaseri
Date:
Subject: Re: Linux on PowerPc
Next
From: Tom Lane
Date:
Subject: Re: In 7.3.1, will I be able to reindex toast?