On Tue, Oct 31, 2023 at 01:58:34PM -0400, Tom Lane wrote: > Bruce Momjian <br...@momjian.us> writes: > > I modified your patch, attached, that I would like to apply to all > > supported versions. > > This seems to have lost the information about what to do if these > functions fail. I think probably the only possible failure cause > in nonblock mode is "unable to enlarge the buffer because OOM", > but that's certainly not the same thing as "cannot fail".
Okay, I added "_successful_ calls", attached. I am not sure what else to add. -- Bruce Momjian <br...@momjian.us> https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 64b2910fee..9e0563d7ca 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -5316,11 +5316,11 @@ int PQsetnonblocking(PGconn *conn, int arg); </para> <para> - In the nonblocking state, calls to + In the nonblocking state, successful calls to <xref linkend="libpq-PQsendQuery"/>, <xref linkend="libpq-PQputline"/>, <xref linkend="libpq-PQputnbytes"/>, <xref linkend="libpq-PQputCopyData"/>, - and <xref linkend="libpq-PQendcopy"/> will not block but instead return - an error if they need to be called again. + and <xref linkend="libpq-PQendcopy"/> will not block; their changes + are stored in the local output buffer until they are flushed. </para> <para>