dbTalk Databases Forums  

Problem in Function returning Cursors - Postgres Sql 7.2

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Problem in Function returning Cursors - Postgres Sql 7.2 in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ramkumar
 
Posts: n/a

Default Problem in Function returning Cursors - Postgres Sql 7.2 - 09-17-2003 , 11:42 PM






In PostgreSql 7.2,
i have written one stored procedure using CURSORS.


CREATE FUNCTION reffunc3(refcursor) RETURNS refcursor AS '
BEGIN
OPEN $1 FOR SELECT empName FROM tbl_employee;
RETURN $1;
END;
' LANGUAGE 'plpgsql';
BEGIN;
SELECT reffunc('funccursor');
FETCH ALL IN funccursor;
COMMIT;

** Function is created successfully
** While executing the SELECT of function,it is returning the
Cursor
** While using the FETCH ALL IN Command ,it is simply saying
"Query Execuetd OK!"

How can i get the Result sets ?

Sudharsan

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.