RE: Using SETOF in plpgsql function
От | Graham Vickrage |
---|---|
Тема | RE: Using SETOF in plpgsql function |
Дата | |
Msg-id | NDBBJABDILOPAOOMFJHOKEAPCEAA.graham@digitalplanit.com обсуждение исходный текст |
Ответ на | Using SETOF in plpgsql function (hlefebvre <hlefebvre@lexbase.net>) |
Список | pgsql-sql |
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.
В списке pgsql-sql по дате отправления: