Is something like this possible?
Because the way I wrote it now, nothing is FOUND from the FETCH and the loop is
exited.
CREATE OR REPLACE FUNCTION test(integer) RETURNS integer AS '
DECLARE
my_cursor refcursor;
my_row row;
BEGIN
my_cursor = get_refcursor($1);
LOOP
FETCH my_cursor INTO my_row;
EXIT WHEN NOT FOUND;
RAISE DEBUG ''id: %'', my_row.id;
END LOOP;
END;
' LANGUAGE 'plpgsql';
Thanks,
kip