Unclear which libpq functions set an error message for PQerrorMessage - Mailing list pgsql-docs

From Jan Behrens
Subject Unclear which libpq functions set an error message for PQerrorMessage
Date
Msg-id 20240325163211.30777d3cdb1821d3d7cda176@magnetkern.de
Whole thread Raw
List pgsql-docs
Hello,

In section "34.2. Connection Status Functions" it is said that, "Nearly
all libpq functions will set a message for PQerrorMessage if they fail."

The wording "Nearly all" is somewhat fuzzy. I read it in such a way
that SOME libpq functions will NOT set a message for PQerrorMessage if
they fail. But which functions? I didn't find any further information
in the documentation, except that for some functions it's explicitly
documented that they set an error message.

In particular, it doesn't seem to be documented which of the following
functions set a message for PQerrorMessage:

* PQsetnonblocking
* PQflush (for the case when -1 and the case when 1 is returned)
* PQenterPipelineMode
* PQpipelineSync
* PQsendFlushRequest
* PQcancel
* PQclientEncoding
* PQsetClientEncoding
(and probably more)

Kind Regards
Jan Behrens



pgsql-docs by date:

Previous
From: Jan Behrens
Date:
Subject: Re: Non-blocking synchronization in libpq using pipeline mode
Next
From: gparc@free.fr
Date:
Subject: Drop a partitioned table "side effect"