Creating a PL/pgSQL function that returns multiple out parameters and refcursor - Mailing list pgsql-general

From Néstor Boscán
Subject Creating a PL/pgSQL function that returns multiple out parameters and refcursor
Date
Msg-id CALyLaQ+PcYnGVhaesdKVJt5PRA6Ma0QuYbPjzJyhujvT-QZHOg@mail.gmail.com
Whole thread Raw
Responses Re: Creating a PL/pgSQL function that returns multiple out parameters and refcursor
List pgsql-general
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;

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Getting my Database name in a C Extension
Next
From: José Luis Rando Calvo
Date:
Subject: Re: Postgres tcp_keepalive_xxxx parameters.