Re: [GENERAL] Returning multiple rows in 8.4

2009-11-09 Thread Sam Mason
On Mon, Nov 09, 2009 at 11:23:52PM +, Raymond O'Donnell wrote: > On 09/11/2009 22:43, Raymond O'Donnell wrote: > > Finally, you can use OUT parameters to return multiple values from the > > function - this is handy if you need to return just a few values. > > Just to clarify further - this las

[GENERAL] Returning multiple rows in 8.4

2009-11-09 Thread Baris Gerze
I have users table such as create table users( user_id bigserial, user_name varchar(50), user_surname varchar(100) ); how can I write a function to return multiple rows? ( in plpgsql ) what is the return value of the function? records? and how can i run it without running as selec

Re: [GENERAL] Returning multiple rows in 8.4

2009-11-09 Thread Raymond O'Donnell
On 09/11/2009 22:43, Raymond O'Donnell wrote: > On 19:59, wrote: >> how can I write a function to return multiple rows? ( in plpgsql ) > > Yep, it's all in the docs: > > http://www.postgresql.org/docs/8.4/static/plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURNING [snip] > Finally, you

Re: [GENERAL] Returning multiple rows in 8.4

2009-11-09 Thread Raymond O'Donnell
On 19:59, wrote: > how can I write a function to return multiple rows? ( in plpgsql ) Yep, it's all in the docs: http://www.postgresql.org/docs/8.4/static/plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURNING > what is the return value of the function? records? Depends on how you declar