PQstatus does not seem to work

From: Juan Backson <juanbackson(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: PQstatus does not seem to work
Date: 2009-08-10 16:41:47
Message-ID: 27c25bc40908100941h42461cfdmaf4efeb14e8b646@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

I used PQstatus(conn) function to check connection status, but I found that
it still returns CONNECTION_OK even after postgres is restarted. Does
anyone know if there is another command that I can use to check connection
status?

What other solution is available to check whether a connection is still
alive?

Thanks,
JB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Thoen 2009-08-10 16:48:10 Accessing a database form another database
Previous Message Rodrick Hales 2009-08-10 16:31:34 NOTICE: there is no transaction in progress