Subject: Are functions computed just once?

From: [email-masked] (Leif Neve)
Date: Mon, 7 Dec 92 17:47:11 -0800

Folks,

I have a remote application which makes extensive use of functions, as in:

	retrieve (rel.attr) where rel.attr2 > some_func()

My question is, does some_func() get invoked just once and the result stored
for each ensuing comparison, or does the darn function get computed each time?

If the latter, is there a way of saying "compute this thing once and no more"?
Obviously I could do two queries, saving the result of some_func() the first
time through. But since the application is really remote, I'd rather not.

Leif Neve

---

From: <[email-masked]>
Date: Mon, 07 Dec 92 20:32:17 PST

> If the latter, is there a way of saying "compute this thing once and no

some_func() will be executed once per tuple in 4.0.1.  when a function is
defined, we allow the user to specify whether or not the function is
cacheable (actually, we allow the user to specify the lifetime of the
function's return value).  however, we don't use this information in
the current release of the system.

i'm not sure what the plans are for getting function cacheing into the
released system.  i'm pretty sure it won't be in 4.1.

					mike