pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: kumar <sgnerd@yahoo.com.sg>
To: pgsql <pgsql-sql@postgresql.org>
Subject: Opening and Fetching  from a refcursor inside a function
Date: Tue, 18 May 2004 17:48:47 +0530
Message-ID: <010501c43cd2$4f7fa2a0$7502a8c0@hdsc.com> (raw)

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

Message-ID: <010501c43cd2$4f7fa2a0$7502a8c0@hdsc.com>
Permalink:  ../010501c43cd2$4f7fa2a0$7502a8c0@hdsc.com/
Also on:    postgresql.org/message-id/010501c43cd2$4f7fa2a0$7502a8c0@hdsc.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sgnerd@yahoo.com.sg
  Subject: Re: Opening and Fetching  from a refcursor inside a function
  In-Reply-To: <010501c43cd2$4f7fa2a0$7502a8c0@hdsc.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox