chiragvaghela 0 Newbie Poster
res = PQexec(conn,"BEGIN");
PQClear(res);
res = PQexec(conn,"DECLARE myportal cursor for select * from test");
PQClear(res);
res= PQexec(conn,"FETCH ALL IN myportak");

----
---USE THE RESULT SET

-------

PQClear(res);
res = PQexec(conn,"END");
PQClear(res);