In the nonblocking state, calls to
PQsendQuery, PQputline,
- PQputnbytes, and
- PQendcopy will not block but instead return
+ PQputnbytes, PQputCopyData,
+ and PQendcopy will not block but instead return
an error if they need to be called again.
Transmits the COPY data in the specified
buffer>, of length nbytes>, to the server.
- The result is 1 if the data was sent, zero if it was not sent
- because the attempt would block (this case is only possible if the
- connection is in nonblocking mode), or -1 if an error occurred.
+ The result is 1 if the data was queued, zero if it was not queued
+ because of full buffers (this will only happen in nonblocking mode),
+ or -1 if an error occurred.
(Use PQerrorMessage to retrieve details if
the return value is -1. If the value is zero, wait for write-ready
and try again.)
connections.)
- The result is 1 if the termination data was sent, zero if it was
- not sent because the attempt would block (this case is only possible
- if the connection is in nonblocking mode), or -1 if an error
- occurred. (Use PQerrorMessage to retrieve
- details if the return value is -1. If the value is zero, wait for
- write-ready and try again.)
+ The result is 1 if the termination message was sent; or in
+ nonblocking mode, this may only indicate that the termination
+ message was successfully queued. (In nonblocking mode, to be
+ certain that the data has been sent, you should next wait for
+ write-ready and call PQflush>, repeating until it
+ returns zero.) Zero indicates that the function could not queue
+ the termination message because of full buffers; this will only
+ happen in nonblocking mode. (In this case, wait for
+ write-ready and try the PQputCopyEnd> call
+ again.) If a hard error occurs, -1 is returned; you can use
+ PQerrorMessage to retrieve details.