From: ljb <ljb1813@pobox.com>
To: pgsql-php@postgresql.org
Subject: Re: pg_transaction_status() unreliable?!
Date: Tue, 5 May 2009 01:20:32 +0000 (UTC)
Message-ID: <gto48v$1o2k$1@news.hub.org> (raw)
References: <20090501170302.2eb5eb84.wmoran@potentialtech.com>
<gtitqq$26l3$1@news.hub.org>
<20090504153421.2e940587.wmoran@potentialtech.com>
<20090504194806.GC13811@it.is.rice.edu>
<20090504165704.b8a0027d.wmoran@potentialtech.com>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: ljb1813@pobox.com
Subject: Re: pg_transaction_status() unreliable?!
In-Reply-To: <gto48v$1o2k$1@news.hub.org>
References: <20090501170302.2eb5eb84.wmoran@potentialtech.com> <gtitqq$26l3$1@news.hub.org> <20090504153421.2e940587.wmoran@potentialtech.com> <20090504194806.GC13811@it.is.rice.edu> <20090504165704.b8a0027d.wmoran@potentialtech.com> <gto48v$1o2k$1@news.hub.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox