Re: SQL-Invoked Procedures for 8.1

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: SQL-Invoked Procedures for 8.1
Дата
Msg-id 415334CB.1090808@opencloud.com
обсуждение исходный текст
Ответ на Re: SQL-Invoked Procedures for 8.1  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: SQL-Invoked Procedures for 8.1  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:

> regression=# create rule r1 as on insert to surprise do
> regression-# ( select 'hello' ; select 'how are you' );
> CREATE RULE

> The 'hello' result was in fact computed and sent by the backend, but it
> was discarded in libpq (see the documentation about PQexec: only the
> last resultset returned by a querystring is returned to the caller).
> psql could have printed both results, but it would need to use
> PQsendQuery/PQgetResult instead of PQexec.

Yikes. I thought this couldn't happen under the V3 extended query protocol.

The JDBC driver currently sends Describe/Execute and expects exactly one 
of RowDescription/NoData followed by zero or more DataRows followed by 
one of CommandComplete/EmptyQueryResponse/PortalSuspended. This seems 
wrong if there could be multiple resultsets from a single Execute.

How can clients distinguish multiple resultsets if they're using the 
extended query protocol?

-O


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: SQL-Invoked Procedures for 8.1
Следующее
От: Tom Lane
Дата:
Сообщение: Re: SQL-Invoked Procedures for 8.1