As far as i know, you can only return single values from functions at the
moment.
Regards
Graham
-----Original Message-----
From: pgsql-sql-owner@hub.org [mailto:pgsql-sql-owner@hub.org]On Behalf
Of hlefebvre
Sent: 23 August 2000 11:08
To: pgsql-sql@postgresql.org
Subject: [SQL] Using SETOF in plpgsql function
Hello,
I'd like to return a set of integer in an pl/pgsql function. How can I
do that ?
I've tried things like that, put I've an error when executing :
CREATE FUNCTION SP_UPLES() RETURNS setof INTEGER AS ' DECLARE ID INTEGER;
BEGIN select a into id from foo; return ID ;
END;
CREATE FUNCTION SP_UPLES() RETURNS setof INTEGER AS ' DECLARE ID setof INTEGER;
BEGIN select a into id from foo; return ID ;
END;
CREATE FUNCTION SP_UPLES() RETURNS setof INTEGER AS '
BEGIN select a into id from foo; return select a from foo;
END;
Any help is welcomed.
Thanks.