Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id BC2A01337B5E for ; Mon, 24 Jan 2011 14:47:31 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 35794-03 for ; Mon, 24 Jan 2011 18:47:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 51AAA133655C for ; Mon, 24 Jan 2011 14:47:24 -0400 (AST) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Mon, 24 Jan 2011 12:47:23 -0600 Message-Id: <4D3D74D60200002500039B3C@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Mon, 24 Jan 2011 12:47:18 -0600 From: "Kevin Grittner" To: "Murray S. Kucherawy" , "Tom Lane" Cc: "Robert Haas" , "pgsql-bugs@postgresql.org" Subject: Re: BUG #5837: PQstatus() fails to report lost connection References: <201101140136.p0E1aTFb017852@wwwmaster.postgresql.org> <1950.1295754244@sss.pgh.pa.us> <6493.1295882981@sss.pgh.pa.us> <4D3D67600200002500039B2C@gw.wicourts.gov> In-Reply-To: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartF7DB8A26.2__=" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/173 X-Sequence-Number: 29195 This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartF7DB8A26.2__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline "Murray S. Kucherawy" wrote: > From: Kevin Grittner [mailto:Kevin.Grittner@wicourts.gov] >> What do you think would make this more clear? > So maybe something like this after the paragraph you cited would > help: > > "Note that after returning a PGresult object, PQresultStatus() > could indicate a fatal error. The caller should still iterate > calling PQgetResult() to completion (i.e. until it returns NULL) > in order to allow libpq to process the error information > completely." A patch based on this suggestion attached for consideration by the community. -Kevin --=__PartF7DB8A26.2__= Content-Type: text/plain; name="PQgetResult-doc.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="PQgetResult-doc.patch" KioqIGEvZG9jL3NyYy9zZ21sL2xpYnBxLnNnbWwKLS0tIGIvZG9jL3NyYy9zZ21sL2xpYnBxLnNn bWwKKioqKioqKioqKioqKioqCioqKiAzODI3LDM4MzIgKioqKiBQR3Jlc3VsdCAqUFFnZXRSZXN1 bHQoUEdjb25uICpjb25uKTsKLS0tIDM4MjcsMzg0MSAtLS0tCiAgICAgICAgIGFjdGl2ZSBhbmQg dGhlIG5lY2Vzc2FyeSByZXNwb25zZSBkYXRhIGhhcyBub3QgeWV0IGJlZW4gcmVhZCBieQogICAg ICAgICA8ZnVuY3Rpb24+UFFjb25zdW1lSW5wdXQ8L2Z1bmN0aW9uPi4KICAgICAgICA8L3BhcmE+ CisgCisgICAgICAgPG5vdGU+CisgICAgICAgIDxwYXJhPgorICAgICAgICAgRXZlbiB3aGVuIDxm dW5jdGlvbj5QUXJlc3VsdFN0YXR1czwvZnVuY3Rpb24+IGluZGljYXRlcyBhIGZhdGFsCisgICAg ICAgICBlcnJvciwgPGZ1bmN0aW9uPlBRZ2V0UmVzdWx0PC9mdW5jdGlvbj4gbXVzdCBiZSBjYWxs ZWQgdW50aWwgaXQKKyAgICAgICAgIHJldHVybnMgYSBudWxsIHBvaW50ZXIuICBUaGlzIGFsbG93 cyA8YXBwbGljYXRpb24+bGlicHE8Lz4gdG8KKyAgICAgICAgIHByb2Nlc3MgdGhlIGVycm9yIGlu Zm9ybWF0aW9uIGNvbXBsZXRlbHkuCisgICAgICAgIDwvcGFyYT4KKyAgICAgICA8L25vdGU+CiAg ICAgICA8L2xpc3RpdGVtPgogICAgICA8L3Zhcmxpc3RlbnRyeT4KICAgICA8L3ZhcmlhYmxlbGlz dD4K --=__PartF7DB8A26.2__=--