When does PQstatus() update? - Mailing list pgsql-general

From Richi Plana
Subject When does PQstatus() update?
Date
Msg-id Pine.LNX.4.04.9812292254200.386-100000@jaguar.mozcom.com
Whole thread Raw
Responses Subselect question
List 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@mozcom.com     `-'-'     `-'-'     `-'-'     `-'-'
------------------------------------------------------------------------
P G P Key available at http://www2.mozcom.com/~richip/richip.asc
Tired of Spam? Join this CAUCE! http://www.cauce.org/


pgsql-general by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Re: [GENERAL] Unsupported frontend protocol error?
Next
From: "Thomas G. Lockhart"
Date:
Subject: Stale porting list?