Re: pg_transaction_status() unreliable?!

Поиск
Список
Период
Сортировка
От ljb
Тема Re: pg_transaction_status() unreliable?!
Дата
Msg-id gto48v$1o2k$1@news.hub.org
обсуждение исходный текст
Ответ на pg_transaction_status() unreliable?!  (Bill Moran <wmoran@potentialtech.com>)
Ответы Re: pg_transaction_status() unreliable?!  (Bill Moran <wmoran@potentialtech.com>)
Список pgsql-php
wmoran@potentialtech.com wrote:
>...
>
> Not that it says anything about PQtransactionStatus being affected by
> the use of it.  If I read this literally, PQgetResult could return a
> result set that is incomplete, which begs the question: how do I merge
> the remaining part of the result set when I get it back next time?
>
> Of course, that's not the intended usage, which leads me to wonder
> what's going on when I know factually that I have no more query
> results pending, yet I have to call it again (apparently) to update
> the client's internal status data structures.

Actually pg_transaction_status doesn't talk to the server at all. The
information it needs is available at the client side. What is happening is
that you are calling pg_transaction_status before you and the server have
finished discussing the COMMIT (meaning, you haven't called pg_get_result
enough to finish the protocol). So the client side hasn't been told that the
transaction is over.

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

Предыдущее
От: Bill Moran
Дата:
Сообщение: Re: pg_transaction_status() unreliable?!
Следующее
От: Bill Moran
Дата:
Сообщение: Re: pg_transaction_status() unreliable?!