On Sun, 18 Aug 2002, Joe Conway wrote:

> Philip Warner wrote:
> > So the obvious question is - in the opinion of people who know the code, 
> > can a function-result-cache be implemented with a lifetime of a single 
> > statement, without butchering the function manager?
> > 
> 
> I don't know if I fully understand what you're proposing, but if I 

Hi Joe,

What Philip seems to be asking for is a mechanism where by if a function
is marked as being mathematically deterministic (given a particular set of
parameters the same result is always returned -- eg: cos(), sin(),
etc) then the result is cached and next time the function is called with
the same argument(s) the result is retrieved from the cache instead of the
function being run again.

If I have got this correct, there is merit in this request. It is a
feature of other databases (such as oracle) and SQL99 provides for a
differentiation between deterministic and 'possibly non-deterministic'
routines. It does not discuss, to my knowledge, how this information
should be used.

I do not know if it is worth while implementing a deterministic function
result cache in Postgres -- I haven't looked at the complexity. Needless
to say, it would not be trivial :-).

Gavin



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to