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

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: (When) can a single SQL statement return multiple result sets?
Дата
Msg-id
169805.1712844454@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
[MASSMAIL](When) can a single SQL statement return multiple result sets? Jan Behrens <jbe-mlist@magnetkern.de>
Re: (When) can a single SQL statement return multiple result sets? Tom Lane <tgl@sss.pgh.pa.us>
Re: (When) can a single SQL statement return multiple result sets? Jan Behrens <jbe-mlist@magnetkern.de>
Re: (When) can a single SQL statement return multiple result sets? Merlin Moncure <mmoncure@gmail.com>
Re: (When) can a single SQL statement return multiple result sets? Thomas Kellerer <shammat@gmx.net>
Re: (When) can a single SQL statement return multiple result sets? Tom Lane <tgl@sss.pgh.pa.us>
Re: (When) can a single SQL statement return multiple result sets? Peter Eisentraut <peter@eisentraut.org>
Re: (When) can a single SQL statement return multiple result sets? Merlin Moncure <mmoncure@gmail.com>
RE: (When) can a single SQL statement return multiple result sets? Patrick FICHE <Patrick.Fiche@aqsacom.com>
Thomas Kellerer  writes:
> Tom Lane schrieb am 11.04.2024 um 01:02:
>> Jan Behrens  writes:
>>> While writing a PostgreSQL client library for Lua supporting
>>> Pipelining (using PQsendQueryParams), I have been wondering if there
>>> are any single SQL commands that return multiple result sets.

>> Right now, I don't think so.

> Hmm, what about functions returning multiple refcursors?

Sure, but let's distinguish between "here's an ugly workaround"
and "it just works".  Aside from being tedious, the refcursor
approach is restrictive: I don't think you can readily make
a refcursor on the result of INSERT/UPDATE/DELETE RETURNING,
nor on utility statements such as EXPLAIN.  (There might be
a way around the former restriction with WITH, but I'm
certain that won't work for EXPLAIN.)

			regards, tom lane


В списке pgsql-general по дате отправления
От: ilya Basin
Дата:
От: Laurenz Albe
Дата:
FAQ