Re: BUG #5837: PQstatus() fails to report lost connection - Mailing list pgsql-bugs

From Murray S. Kucherawy
Subject Re: BUG #5837: PQstatus() fails to report lost connection
Date
Msg-id F5833273385BB34F99288B3648C4F06F1341E73FCB@EXCH-C2.corp.cloudmark.com
Whole thread Raw
In response to Re: BUG #5837: PQstatus() fails to report lost connection  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #5837: PQstatus() fails to report lost connection
Re: BUG #5837: PQstatus() fails to report lost connection
List pgsql-bugs
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Monday, January 24, 2011 7:30 AM
> To: Murray S. Kucherawy
> Cc: Robert Haas; pgsql-bugs@postgresql.org
> Subject: Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection
>=20
> "Murray S. Kucherawy" <msk@cloudmark.com> writes:
> > Given what you say here, this seems to be an exception for which there
> > is currently no detection mechanism short of looking for that one
> > specific error string indicating it was administrative action causing
> > the error.
>=20
> This is complete nonsense.  If you followed the documented method for
> using PQgetResult -- ie, keep calling it till it returns NULL, rather
> than assuming there will be a specific number of results --- then
> PQstatus would show you the bad status afterwards.

Your assertion here of "Read the result set to exhaustion, THEN check conne=
ction status to see if it was bad to begin with," can be politely described=
 as counter-intuitive.

Please, at a minimum, add some documentation about it.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5837: PQstatus() fails to report lost connection
Next
From: Tom Lane
Date:
Subject: Re: BUG #5837: PQstatus() fails to report lost connection