On Tue, 22 Dec 2009 14:48:55 +0100 Filip RembiaĆkowski <plk.zu...@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 -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql