@@ -4318,8 +4318,8 @@ int PQsetnonblocking(PGconn *conn, int arg);
4318
4318
<para>
4319
4319
In the nonblocking state, calls to
4320
4320
<function>PQsendQuery</function>, <function>PQputline</function>,
4321
- <function>PQputnbytes</function>, and
4322
- <function>PQendcopy</function> will not block but instead return
4321
+ <function>PQputnbytes</function>, <function>PQputCopyData</function>,
4322
+ and <function>PQendcopy</function> will not block but instead return
4323
4323
an error if they need to be called again.
4324
4324
</para>
4325
4325
@@ -4961,9 +4961,9 @@ int PQputCopyData(PGconn *conn,
4961
4961
<para>
4962
4962
Transmits the <command>COPY</command> data in the specified
4963
4963
<parameter>buffer</>, of length <parameter>nbytes</>, to the server.
4964
- The result is 1 if the data was sent , zero if it was not sent
4965
- because the attempt would block (this case is only possible if the
4966
- connection is in nonblocking mode), or -1 if an error occurred.
4964
+ The result is 1 if the data was queued , zero if it was not queued
4965
+ because of full buffers (this will only happen in nonblocking mode),
4966
+ or -1 if an error occurred.
4967
4967
(Use <function>PQerrorMessage</function> to retrieve details if
4968
4968
the return value is -1. If the value is zero, wait for write-ready
4969
4969
and try again.)
@@ -5009,13 +5009,18 @@ int PQputCopyEnd(PGconn *conn,
5009
5009
connections.)
5010
5010
</para>
5011
5011
5012
- <para>
5013
- The result is 1 if the termination data was sent, zero if it was
5014
- not sent because the attempt would block (this case is only possible
5015
- if the connection is in nonblocking mode), or -1 if an error
5016
- occurred. (Use <function>PQerrorMessage</function> to retrieve
5017
- details if the return value is -1. If the value is zero, wait for
5018
- write-ready and try again.)
5012
+ <para>
5013
+ The result is 1 if the termination message was sent; or in
5014
+ nonblocking mode, this may only indicate that the termination
5015
+ message was successfully queued. (In nonblocking mode, to be
5016
+ certain that the data has been sent, you should next wait for
5017
+ write-ready and call <function>PQflush</>, repeating until it
5018
+ returns zero.) Zero indicates that the function could not queue
5019
+ the termination message because of full buffers; this will only
5020
+ happen in nonblocking mode. (In this case, wait for
5021
+ write-ready and try the <function>PQputCopyEnd</> call
5022
+ again.) If a hard error occurs, -1 is returned; you can use
5023
+ <function>PQerrorMessage</function> to retrieve details.
5019
5024
</para>
5020
5025
5021
5026
<para>
0 commit comments