Results 1 to 1 of 1
Nov 18, 2004, 01:30 #1
- Join Date
- Oct 2004
- 0 Post(s)
- 0 Thread(s)
using a refcursor returned from a function( plpgsql)
I am trying to use a cursor returned from a function to manipulate some tables in database.
But I am trying out this small example to give me an idea of how to go about it.
CREATE TABLE test (col text);
INSERT INTO test VALUES ('123');
CREATE FUNCTION reffunc(refcursor) RETURNS refcursor AS '
OPEN $1 FOR SELECT col FROM test;
' LANGUAGE 'plpgsql';
FETCH ALL IN funccursor;
The problem is that I get these messages
1. Error: fmgr_info : function 0: cache lookup failed
2.notice: current transaction is aborted , queries ignored until end of transcation block.
I will be greatful for you help.
Thanks[I]Mubangizi Martin Gordon
Bsc(Phy and Math) with Educ, MCA.