On 20/02/2010 13:54, Nilesh Govindarajan wrote: > > Ah perfect ! problem solved. Thanks ! > Glad it was that easy! You ought to read up on set-returning functions in the docs: http://www.postgresql.org/docs/8.4/static/plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURNING See the section on "RETURN NEXT and RETURN QUERY". Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@xxxxxx -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general