postgres.git / summary / log / commit / refs
commit 06711de9d9d4e122d4e4c9b801b471e048281f48
Author: Bruce Momjian <bruce@momjian.us>
Date: Fri Mar 11 10:55:13 2011 +0000
First released in: 9.1.0
Document that libpq's PQgetResult() should be called after a fatal error
to fully process errors.
doc/src/sgml/libpq.sgml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 49edc51dbac..59b4011b3f6 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -3846,6 +3846,15 @@ PGresult *PQgetResult(PGconn *conn);
active and the necessary response data has not yet been read by
<function>PQconsumeInput</function>.
</para>
+
+ <note>
+ <para>
+ Even when <function>PQresultStatus</function> indicates a fatal
+ error, <function>PQgetResult</function> should be called until it
+ returns a null pointer to allow <application>libpq</> to
+ process the error information completely.
+ </para>
+ </note>
</listitem>
</varlistentry>
</variablelist>
[parent: ad44d505917b]