When does PQstatus() update?

From: Richi Plana <richip(at)mozcom(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: When does PQstatus() update?
Date: 1998-12-29 15:00:30
Message-ID: Pine.LNX.4.04.9812292254200.386-100000@jaguar.mozcom.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Just wondering when the result of the function PQstatus() gets updated?
Can I expect it to be updated while connected even without performing any
transactions/communications with the backend?

I tried PQexec()'ing a "BEGIN TRANSACTION" on a dead backend and
immediately checked PQstatus() as well as PQresultStatus(). PQstatus()
returned a CONNECTION_OK while PQresultStatus() returned
PGRES_FATAL_ERROR. I tried it again on the same dead-connection backend a
couple of seconds later and got a CONNECTION_BAD fro PQstatus() and a
PGRES_NONFATAL_ERROR from PQresultStatus().

L L Richi Plana 8^) ,-,-. ,-,-. ,-,-. ,-,-. ,-
LL LL Systems Administrator / / \ \ / / \ \ / / \ \ / / \ \ / /
LLLLL Mosaic Communications, Inc. \ \ / / \ \ / / \ \ / / \ \ / /
LLLLL mailto:richip(at)mozcom(dot)com `-'-' `-'-' `-'-' `-'-'
------------------------------------------------------------------------
P G P Key available at http://www2.mozcom.com/~richip/richip.asc
Tired of Spam? Join this CAUCE! http://www.cauce.org/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-12-29 15:08:10 Stale porting list?
Previous Message Oliver Elphick 1998-12-29 11:59:40 Re: [GENERAL] Unsupported frontend protocol error?