Re: [GENERAL] Fwd: Returning Cursor

2008-08-04 Thread Craig Ringer
ravi kiran wrote: > Hello, > > I am a developer working on postgres. I just wrote a function which ll > return a refcurosor as shown below. [snip] > i have problems accessing this function from my middle tier i.e VC++. > > I wrote a VC statement to retrieve values from this refcursor using a re

[GENERAL] Fwd: Returning Cursor

2008-08-04 Thread ravi kiran
Hello, I am a developer working on postgres. I just wrote a function which ll return a refcurosor as shown below. CREATE OR REPLACE FUNCTION reffunc(refcursor) RETURNS refcursor AS $BODY$ BEGIN OPEN $1 FOR SELECT * FROM SAM1; RETURN $1; END; $BODY$ LANGUAGE 'plpgsql' VOLATILE COST

[GENERAL] Fwd: Returning Cursor

2008-08-04 Thread ravi kiran
Hello, I am a developer working on postgres. I just wrote a function which ll return a refcurosor as shown below. CREATE OR REPLACE FUNCTION reffunc(refcursor) RETURNS refcursor AS $BODY$ BEGIN OPEN $1 FOR SELECT * FROM SAM1; RETURN $1; END; $BODY$ LANGUAGE 'plpgsql' VOLATILE COST