]> granicus.if.org Git - postgresql/commitdiff
Add some weasel wording about threaded usage of PGresults.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 2 Dec 2011 16:33:53 +0000 (11:33 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 2 Dec 2011 16:34:14 +0000 (11:34 -0500)
PGresults used to be read-only from the application's viewpoint, but now
that we've exposed various functions that allow modification of a PGresult,
that sweeping statement is no longer accurate.  Noted by Dmitriy Igrishin.

doc/src/sgml/libpq.sgml

index 08aa3482637530f6f265b0c2dbdc25e6a9d28571..2ad9a10be23ce41a71f0c535bb0ba92488fea4ac 100644 (file)
@@ -7161,8 +7161,12 @@ int PQisthreadsafe();
   </para>
 
   <para>
-   <structname>PGresult</> objects are read-only after creation, and so
-   can be passed around freely between threads.
+   <structname>PGresult</> objects are normally read-only after creation,
+   and so can be passed around freely between threads.  However, if you use
+   any of the <structname>PGresult</>-modifying functions described in
+   <xref linkend="libpq-misc"> or <xref linkend="libpq-events">, it's up
+   to you to avoid concurrent operations on the same <structname>PGresult</>,
+   too.
   </para>
 
   <para>