8000 Document that PQexec() can handle a NULL res pointer just fine. · postwait/postgres@0b6a1e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0b6a1e8

Browse files
committed
Document that PQexec() can handle a NULL res pointer just fine.
Backpatch to 9.1. Mark Hills
1 parent 7e2c42c commit 0b6a1e8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/src/sgml/libpq.sgml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
return a non-null object pointer, unless perhaps there is too
6363
little memory even to allocate the <structname>PGconn</> object.
6464
The <function>PQstatus</> function should be called to check
65-
whether a connection was successfully made before queries are sent
65+
the return value for a successful connection before queries are sent
6666
via the connection object.
6767

6868
<warning>
@@ -1750,8 +1750,10 @@ PGresult *PQexec(PGconn *conn, const char *command);
17501750
Returns a <structname>PGresult</structname> pointer or possibly a null
17511751
pointer. A non-null pointer will generally be returned except in
17521752
out-of-memory conditions or serious errors such as inability to send
1753-
the command to the server. If a null pointer is returned, it should
1754-
be treated like a <symbol>PGRES_FATAL_ERROR</symbol> result. Use
1753+
the command to the server. The <function>PQresultStatus</> function
1754+
should be called to check the return value for any errors (including
1755+
the value of a null pointer, in which case it will return
1756+
<symbol>PGRES_FATAL_ERROR</symbol>). Use
17551757
<function>PQerrorMessage</function> to get more information about such
17561758
errors.
17571759
</para>

0 commit comments

Comments
 (0)
0