Re: (When) can a single SQL statement return multiple result sets?

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Behrens <jbe-mlist(at)magnetkern(dot)de>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: (When) can a single SQL statement return multiple result sets?
Date: 2024-04-15 14:55:43
Message-ID: 9ef79e99-fc9c-4328-b272-31d9011734a4@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11.04.24 01:02, Tom Lane wrote:
>> And if not, why can't I write a stored procedure
>> or function that returns multiple result sets?
>
> [ shrug... ] Lack of round tuits, perhaps. We don't have any
> mechanism today whereby a stored procedure could say "please ship
> this resultset off to the client, but I want to continue afterwards".
> But you can do that in other RDBMSes and probably somebody will be
> motivated to make it possible in Postgres.

The development of this feature was the subject of this thread:
https://www.postgresql.org/message-id/flat/6e747f98-835f-2e05-cde5-86ee444a7140(at)2ndquadrant(dot)com

But it has not concluded successfully yet.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Behrens 2024-04-15 15:24:31 Re: (When) can a single SQL statement return multiple result sets?
Previous Message Jan Behrens 2024-04-15 14:52:56 No error message/code for commands after libpq pipeline abortion