"Murray S. Kucherawy" <[email protected]> wrote:
> From: Kevin Grittner [mailto:[email protected]]
>> 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
*** a/doc/src/sgml/libpq.sgml
--- b/doc/src/sgml/libpq.sgml
***************
*** 3827,3832 **** PGresult *PQgetResult(PGconn *conn);
--- 3827,3841 ----
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> must be called until it
+ returns a null pointer. This allows <application>libpq</> to
+ process the error information completely.
+ </para>
+ </note>
</listitem>
</varlistentry>
</variablelist>
--
Sent via pgsql-bugs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs