Re: Custom cache implemented in a postgresql C function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
Cc: Gabi Julien <gabi(dot)julien(at)broadsign(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Custom cache implemented in a postgresql C function
Date: 2010-10-21 14:48:36
Message-ID: 23525.1287672516@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-10-21 15:00:03 Re: full vacuum cancelation
Previous Message Aljoša Mohorović 2010-10-21 14:40:10 Re: postgres services on amazon