Richard Huxton <[EMAIL PROTECTED]> writes:
> On Monday 14 Oct 2002 6:17 pm, Tom Lane wrote:
>> Unfortunately that's not true at all, or at least not helpful for this
>> problem. The cachable attribute was poorly named, because it leads
>> people to think that PG *will* cache function results, as
On Monday 14 Oct 2002 6:17 pm, Tom Lane wrote:
> Richard Huxton <[EMAIL PROTECTED]> writes:
> > Have you looked at marking f1() etc cachable? This means Postgresql
> > will only call the function once for each parameter-set.
>
> Unfortunately that's not true at all, or at least not helpful for thi
Richard Huxton <[EMAIL PROTECTED]> writes:
> Have you looked at marking f1() etc cachable? This means Postgresql
> will only call the function once for each parameter-set.
Unfortunately that's not true at all, or at least not helpful for this
problem. The cachable attribute was poorly named, bec
On Monday 14 Oct 2002 3:22 pm, Heiko Stoermer wrote:
> Hello,
>
> I'm trying to achieve the following with pl/pgsql in postgres 7.2:
>
> I need a stored procedure proc() that calculates values for some fields
> a = f1()
> b = a + f2()
> c = b + f3()
> and returns the tuple (a,b,c) as a rowtype,
M
If your f1, f2, and f3 functions depend only on their arguments; that
is, if you call one
of those functions with the same set of arguments, it will return the
same answer every
time, you can define the functions as "iscachable" as follows:
create function f1()
...
language ...
with (iscachable
Hello,
I'm trying to achieve the following with pl/pgsql in postgres 7.2:
I need a stored procedure proc() that calculates values for some fields
a = f1()
b = a + f2()
c = b + f3()
and returns the tuple (a,b,c) as a rowtype,
so that "select proc()" produces a "normal" resultset that can be used