Hi Keith:
--- Keith Gray <[EMAIL PROTECTED]> wrote:
> Help,
>
> I have just been comparing some large table
> performance
> under 7.1 using the
>
> select max(primary key)from table;
>
> We are using this for various functions including
> sequence.
>
Try using the following as alter
I would like to write a function as a set of SQL statements, and then
use that function
in a trigger. However, since triggers require a return type of opaque,
and SQL functions
cannot return type opaque, this doesn't look possible. Am I missing
something? The SQL
that I would expect to do this
Help,
I have just been comparing some large table performance
under 7.1 using the
select max(primary key)from table;
We are using this for various functions including sequence.
It is taking 9 seconds to return this from around 1 million records.
Shouldn't this be an instantaneous look
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