Re: [SQL] how to write cursors

2012-04-04 Thread Pavel Stehule
Hello use a refcursors http://www.postgresql.org/docs/9.1/static/plpgsql-cursors.html Regards Pavel Stehule 2012/4/4 La Chi : > hi every one > > i have created this simple function which returns a column of table , i have > used simple SELECT statement , i simply want to know how can i achieve

[SQL] how to write cursors

2012-04-04 Thread La Chi
hi every one i have created this simple function which returns a column of table , i have used simple SELECT statement , i simply want to know how can i achieve the same task with the help of cursor CREATE OR REPLACE FUNCTION foo(id int) returns table(cust_id int) as $BODY$ BEGIN         retur