Question regarding Sync message and unnamed portal

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Question regarding Sync message and unnamed portal
Дата
Msg-id 20120930.182637.1199893746953313328.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответы Re: Question regarding Sync message and unnamed portal  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Question regarding Sync message and unnamed portal  (David Johnston <polobo@yahoo.com>)
Список pgsql-hackers
From the manual:

"An unnamed portal is destroyed at the end of the transaction"

"At completion of each series of extended-query messages, the frontend
should issue a Sync message. This parameterless message causes the
backend to close the current transaction if it's not inside a
BEGIN/COMMIT transaction block"

From these statements, I would think #4 will fail in the following
sequence of commands because #3 closes transaction and it destroys
unnamed portal: 1)Parse/Bind creates unnamed portal,
2)Parse/Bind/Execute creates named portal and executes, 3)Send Sync
message (because it is required in extended protocol), 4)Execute
unnamed portal created in #1.

If this is true, that means unnamed portal execution and named portal
execution cannot be mixed unless they are inside an explicit
transaction. IMO this should be described in the document.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp



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

Предыдущее
От: Darren Duncan
Дата:
Сообщение: Re: is JSON really "a type" (Re: data to json enhancements)
Следующее
От: Kohei KaiGai
Дата:
Сообщение: Re: 64-bit API for large object