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.