Multiple result set not working

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Multiple result set not working

Muthukumar.GK


  Hi team,

is it possible to return Multiple results set from procedure/function on single execution. Please advise me on this. I have written sample code below and when i execute it i dont get any result set 

CREATE OR REPLACE FUNCTION multiResultset(               

                ref1 refcursor,

                ref2 refcursor)

                RETURNS SETOF refcursor

AS $$

BEGIN

 

  open ref1 for

    select * from los_approverreassignwhere pk_id= 10;

 

  open ref2 for

    select * from los_approverreassignwhere pk_id= 11;

 

END;

$$

LANGUAGE 'plpgsql';




Regards

Muthu