I know the following is possible. i.e I can have a ref cursor as a return value in Postgresql.
CREATE FUNCTION employeefunc(int) RETURNS refcursor AS '
DECLARE ref refcursor;
BEGIN
OPEN ref FOR SELECT * FROM employee where id = $1;
RETURN ref;
END;
But can we have a ref cursor as an OUT parameter in a postgresql function?
For your reference, following the the Oracle equivalent of what I'm looking for.
create or replace procedure employeefunc(rc out sys_refcursor) as
begin
open rc for 'select * from employee';
end;