Re: [GENERAL] Howto return values from a function

2008-05-16 Thread A B
Great! :D That did the trick! Thank you so very much! 2008/5/16 Richard Huxton <[EMAIL PROTECTED]>: > A B wrote: >>> >>> How you generate the results is up to you. when you have them you >>> either use RETURN NEXT or RETURN QUERY to return them to the caller. >> >> Now I get the reply >> >> ERROR:

Re: [GENERAL] Howto return values from a function

2008-05-16 Thread Richard Huxton
A B wrote: How you generate the results is up to you. when you have them you either use RETURN NEXT or RETURN QUERY to return them to the caller. Now I get the reply ERROR: set-valued function called in context that cannot accept a set CONTEXT: PL/pgSQL function "actionlist" line 11 at retur

Re: [GENERAL] Howto return values from a function

2008-05-16 Thread Pavel Stehule
Hello use SELECT * FROM actionlist(...); Regards Pavel Stehule 2008/5/16 A B <[EMAIL PROTECTED]>: >> How you generate the results is up to you. when you have them you >> either use RETURN NEXT or RETURN QUERY to return them to the caller. > > Now I get the reply > > ERROR: set-valued function c

Re: [GENERAL] Howto return values from a function

2008-05-16 Thread Ian Barwick
2008/5/16 A B <[EMAIL PROTECTED]>: >> How you generate the results is up to you. when you have them you >> either use RETURN NEXT or RETURN QUERY to return them to the caller. > > Now I get the reply > > ERROR: set-valued function called in context that cannot accept a set > CONTEXT: PL/pgSQL fun

Re: [GENERAL] Howto return values from a function

2008-05-16 Thread A B
> How you generate the results is up to you. when you have them you > either use RETURN NEXT or RETURN QUERY to return them to the caller. Now I get the reply ERROR: set-valued function called in context that cannot accept a set CONTEXT: PL/pgSQL function "actionlist" line 11 at return next an

Re: [GENERAL] Howto return values from a function

2008-05-15 Thread A. Kretschmer
am Thu, dem 15.05.2008, um 14:46:02 +0200 mailte A B folgendes: > > What exactly about the documentation isn't clear? > I would have liked a few more examples... but that is perhaps just me. http://www.java2s.com/Code/PostgreSQL/CatalogPostgreSQL.htm > > > Like the documentation says: SETOF so

Re: [GENERAL] Howto return values from a function

2008-05-15 Thread A B
> What exactly about the documentation isn't clear? I would have liked a few more examples... but that is perhaps just me. > Like the documentation says: SETOF sometype. Ah, so I just create my own type with "CREATE TYPE ..." and use that type in the function. -- Sent via pgsql-general mailing l

Re: [GENERAL] Howto return values from a function

2008-05-15 Thread Martijn van Oosterhout
On Thu, May 15, 2008 at 02:25:36PM +0200, A B wrote: > I'm still trying to learn to write plpgsql functions, but I find the > docs a little short on examples on how to return stuff from a > function. I'm very grateful for any help on this. What exactly about the documentation isn't clear? http://