Alban Hertroys <dalroi@solfertje.student.utwente.nl> writes:
> That sounds like your function would classify as a STABLE function
> within Postgres, did you define it as such? Postgres will cache the
> results of STABLE (and IMMUTABLE) functions all by itself, in which
> case you may not need your custom cache.
Uh, no it won't. It will pre-evaluate immutable functions that are
called with constant arguments, which is not the same thing at all.
regards, tom lane