Re: Stored procedures and out parameters

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: Stored procedures and out parameters
Дата
Msg-id 8a46ad89-f842-4cb9-a6a3-90142374290f@manitou-mail.org
обсуждение исходный текст
Ответ на Re: Stored procedures and out parameters  (Shay Rojansky <roji@roji.org>)
Список pgsql-hackers
    Shay Rojansky wrote:

> In one way that's good, but I wonder how this squares with the following
> written by David above:
> > 1. A stored procedure should be able to return multiple resultsets with
> different structures.
> > 2. A stored procedure can decide dynamically of the structure of the
> resultset(s) it returns, and the caller will discover it as they're
> returned, not before.

> Both of the above seem to be simply incompatible with the current
> PostgreSQL protocol. Describe currently returns a single RowDescription,
> which describes a single resultset, not more. And as I wrote before, I
> don't see how it's possible with the current protocol for the caller to
> discover the structure of the resultset(s) "as they're returned"

It works at least with the simple query mode, where it's similar
to handling results from a query string containing multiple
statements separated by semicolons.

But it's not clear whether this could work with the extended query
protocol. The doc says that the necessary RowDescription message(s)
would be missing:

  "The possible responses to Execute are the same as those described
   above for queries issued via simple query protocol, except that
   Execute doesn't cause ReadyForQuery or RowDescription to be issued",


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: doc - improve description of default privileges
Следующее
От: Surafel Temesgen
Дата:
Сообщение: Conflict handling for COPY FROM