Skip to content

Commit fb19729

Browse files
committed
libpq doc: Clarify what commands return PGRES_TUPLES_OK
The old text claimed that INSERT and UPDATE always return PGRES_COMMAND_OK, but INSERT/UPDATE with RETURNING return PGRES_TUPLES_OK. Josh Kupershmidt
1 parent c2a14bc commit fb19729

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/src/sgml/libpq.sgml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2469,7 +2469,8 @@ ExecStatusType PQresultStatus(const PGresult *res);
24692469
command that happens to retrieve zero rows still shows
24702470
<literal>PGRES_TUPLES_OK</literal>.
24712471
<literal>PGRES_COMMAND_OK</literal> is for commands that can never
2472-
return rows (<command>INSERT</command>, <command>UPDATE</command>,
2472+
return rows (<command>INSERT</command> or <command>UPDATE</command>
2473+
without a <literal>RETURNING</literal> clause,
24732474
etc.). A response of <literal>PGRES_EMPTY_QUERY</literal> might
24742475
indicate a bug in the client software.
24752476
</para>

0 commit comments

Comments
 (0)