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

Lines changed: 2 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy