Search Postgresql Archives

Multiple result set not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





  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';


image.png


Regards

Muthu


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux