Opening and Fetching from a refcursor inside a function - Mailing list pgsql-sql

From kumar
Subject Opening and Fetching from a refcursor inside a function
Date
Msg-id 010501c43cd2$4f7fa2a0$7502a8c0@hdsc.com
Whole thread Raw
List pgsql-sql
Dear Friends,
 
I am using Postgres 7.3.4 on Redhat linux
 
In one of my requirement, I am getting a cursor as input parameter.
I am trying to process the records inside this cursor and i am not able to do it. (Some thing like opening and fetching a cursor in SQL Server)
 
My approach is as follows.
 
fn_xyz(refcursor,int4) returns record
Declare
data ALIAS $1;
mview RECORD;
FOR mview IN FETCH ALL IN data
LOOP
//Process the records.
END LOOP;
 
Is this possible. Please shed some light.
 
Thanks
Kumar

pgsql-sql by date:

Previous
From: "Stijn Vanroye"
Date:
Subject: Re: a wierd query
Next
From: Dan Field
Date:
Subject: Very slow search using basic pattern matching