Re: "iscachable" functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Eric B(dot)Ridge" <ebr(at)tcdi(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: "iscachable" functions
Date: 2003-02-14 22:21:33
Message-ID: 11570.1045261293@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Eric B.Ridge" <ebr(at)tcdi(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-02-14 22:25:09 Re: In 7.3.1, will I be able to reindex toast?
Previous Message Medi Montaseri 2003-02-14 22:00:54 Re: Linux on PowerPc