epeating 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 <a class="xref" href="libpq-copy.html#LIBPQ-PQPUTCOPYEND"><code class="function">PQputCopyEnd</code></a> call
       again.)  If a hard error occurs, -1 is returned; you can use
       <a class="xref" href="libpq-status.html#LIBPQ-PQERRORMESSAGE"><code class="