[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    [GENERAL] When does PQstatus() update?
From:       Richi Plana <richip () mozcom ! com>
Date:       1998-12-29 15:00:30
[Download RAW message or body]

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/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic