On Fri, May 06, 2005 at 05:58:11AM -0700, Vidya wrote:
>
> How do I create a cursor in psql .
>
> I have a function which opens a cursor .
> SampleDB=# create function reffunc(refcursor) returns refcursor as $$
> SampleDB$# begin
> SampleDB$# open $1 for select col from test;
> SampleDB$# return
Hello All,
How do I create a cursor in psql .
I have a function which opens a cursor .
SampleDB=# create function reffunc(refcursor) returns refcursor as $$SampleDB$# beginSampleDB$# open $1 for select col from test;SampleDB$# return $1;SampleDB$# end;SampleDB$# $$ language sql;ERROR: syntax err