Search Postgresql Archives

Creating a PL/pgSQL function that returns multiple out parameters and refcursor

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

 



Hi

Ho do I create a PL/pgSQL function that returns multiple out parameters and a refcursor. Something like this:

create function myfunction(p_cursor out refcursor, p_code out varchar, p_message out varchar) returns record as $$
  begin
    open p_cursor is select * from table;

    p_code := 'OK';
    p_message := 'message';

    return ???
  end;
$$ language plpgsql;

[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