Re: short-cutting if sum()>constant - Mailing list pgsql-sql

From Ivan Sergio Borgonovo
Subject Re: short-cutting if sum()>constant
Date
Msg-id 20091222182006.73810ebd@dawn.webthatworks.it
Whole thread Raw
In response to Re: short-cutting if sum()>constant  (Filip Rembiałkowski <plk.zuber@gmail.com>)
List pgsql-sql
On Tue, 22 Dec 2009 14:48:55 +0100
Filip Rembiałkowski <plk.zuber@gmail.com> wrote:

> With plain SQL, no.
>
> With a user defined function in PL/PgSQL, yes.

thanks to all.

I'm on 8.3 so no CTE.
I was hoping there was some way to write it in plain SQL.
I'm planning to wrap everything in a plpgsql function using cursors
and then switch to WITH when I'll move to 8.4.

--
Ivan Sergio Borgonovo
http://www.webthatworks.it



pgsql-sql by date:

Previous
From: msi77
Date:
Subject: Re: short-cutting if sum()>constant
Next
From: Andreas Kretschmer
Date:
Subject: Re: short-cutting if sum()>constant