Re: Multiple result set to be returned in procedure/function

From: Thomas Kellerer <shammat(at)gmx(dot)net>
To:
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Multiple result set to be returned in procedure/function
Date: 2020-11-19 12:28:49
Message-ID: 6fb840d6-1c12-6111-d32d-17cc1c6379d2@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Daniel Verite schrieb am 19.11.2020 um 13:06:
>> arthur=> select * from get_results();
>> get_results
>> --------------------
>> <unnamed portal 1>
>> <unnamed portal 2>
>
> Friendlier names may be used by assigning them in the function,
> i.e. plpgsql does support:
>
> declare
> c1 refcursor := 'mycursorname';
>
> Then the caller might simply hardcode the cursor names in the FETCH
> statements rather than building them dynamically at runtime.

Ah, cool.

That is indeed much easier to work with (in case I ever have to)

Thomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Zwettler Markus (OIZ) 2020-11-19 13:50:06 Linux package upgrade without dependency conflicts
Previous Message Daniel Verite 2020-11-19 12:06:50 Re: Multiple result set to be returned in procedure/function