aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2011-11-10 13:00:44 -0500
committerBruce Momjian <bruce@momjian.us>2011-11-10 13:00:44 -0500
commitd5873b635989e0b780c1c9f07139dfebf0f5e546 (patch)
tree1ab00f4fd4768e5e256fbe036f5d0ad84c5640a7 /doc/src
parent2e02280726f5ca7a8e3c76e1491eaf5ab00fc8f4 (diff)
downloadpostgresql-d5873b635989e0b780c1c9f07139dfebf0f5e546.tar.gz
postgresql-d5873b635989e0b780c1c9f07139dfebf0f5e546.zip
Document that PQexec() can handle a NULL res pointer just fine.
Backpatch to 9.1. Mark Hills
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/libpq.sgml8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index f2f67e20ffd..3d5f98ba2a6 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -62,7 +62,7 @@
return a non-null object pointer, unless perhaps there is too
little memory even to allocate the <structname>PGconn</> object.
The <function>PQstatus</> function should be called to check
- whether a connection was successfully made before queries are sent
+ the return value for a successful connection before queries are sent
via the connection object.
<warning>
@@ -1754,8 +1754,10 @@ PGresult *PQexec(PGconn *conn, const char *command);
Returns a <structname>PGresult</structname> pointer or possibly a null
pointer. A non-null pointer will generally be returned except in
out-of-memory conditions or serious errors such as inability to send
- the command to the server. If a null pointer is returned, it should
- be treated like a <symbol>PGRES_FATAL_ERROR</symbol> result. Use
+ the command to the server. The <function>PQresultStatus</> function
+ should be called to check the return value for any errors (including
+ the value of a null pointer, in which case it will return
+ <symbol>PGRES_FATAL_ERROR</symbol>). Use
<function>PQerrorMessage</function> to get more information about such
errors.
</para>