Re: [SQL] Using SETOF in plpgsql function

2000-08-23 Thread Jan Wieck
Tom Lane wrote: > Jan Wieck <[EMAIL PROTECTED]> writes: > > hlefebvre wrote: > >> I'd like to return a set of integer in an pl/pgsql function. How can I > >> do that ? > > > You can't. Not with PL/pgSQL nor with any other PL or C. The > > problem is nested deeper and requires the planned

Re: [SQL] Using SETOF in plpgsql function

2000-08-23 Thread Tom Lane
Jan Wieck <[EMAIL PROTECTED]> writes: > hlefebvre wrote: >> I'd like to return a set of integer in an pl/pgsql function. How can I >> do that ? > You can't. Not with PL/pgSQL nor with any other PL or C. The > problem is nested deeper and requires the planned querytree > redesign to

Re: [SQL] Using SETOF in plpgsql function

2000-08-23 Thread Karel Zak
On Wed, 23 Aug 2000, Jan Wieck wrote: > Before you ask: The mentioned redesign will NOT be done for > 7.1, and I'm not sure if we will be able to do it for 7.2 > yet. I hope that 7.2 :-), my query/plan cache is still outside current interest and if core developers not will wo

Re: [SQL] Using SETOF in plpgsql function

2000-08-23 Thread Jan Wieck
hlefebvre wrote: > Hello, > > I'd like to return a set of integer in an pl/pgsql function. How can I > do that ? You can't. Not with PL/pgSQL nor with any other PL or C. The problem is nested deeper and requires the planned querytree redesign to get solved. Before you ask: T

Re: [SQL] Using SETOF in plpgsql function

2000-08-23 Thread hlefebvre
Graham Vickrage wrote: > > As far as i know, you can only return single values from functions at the > moment. > > Regards > > Graham Hum, this is possible a least in SQL functions. But maybe impossible in PL/PGSQL

RE: [SQL] Using SETOF in plpgsql function

2000-08-23 Thread Graham Vickrage
As far as i know, you can only return single values from functions at the moment. Regards Graham -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of hlefebvre Sent: 23 August 2000 11:08 To: [EMAIL PROTECTED] Subject: [SQL] Using SETOF in plpgsql function

[SQL] Using SETOF in plpgsql function

2000-08-23 Thread hlefebvre
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;