Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1romJ6-003JGi-0K for pgsql-docs@arkaria.postgresql.org; Mon, 25 Mar 2024 15:32:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1romJ4-00515I-K0 for pgsql-docs@arkaria.postgresql.org; Mon, 25 Mar 2024 15:32:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1romJ4-00515A-Cb for pgsql-docs@lists.postgresql.org; Mon, 25 Mar 2024 15:32:14 +0000 Received: from gaoxing.magnetkern.de ([167.235.225.147]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1romJ2-006QOa-BN for pgsql-docs@lists.postgresql.org; Mon, 25 Mar 2024 15:32:14 +0000 Received: from titanium.fritz.box (p200300c26f1e6f00264bfefffe54b09c.dip0.t-ipconnect.de [IPv6:2003:c2:6f1e:6f00:264b:feff:fe54:b09c]) by gaoxing.magnetkern.de (Postfix) with ESMTPSA id 3298B5010B for ; Mon, 25 Mar 2024 16:31:58 +0100 (CET) Date: Mon, 25 Mar 2024 16:32:11 +0100 From: Jan Behrens To: pgsql-docs@lists.postgresql.org Subject: Unclear which libpq functions set an error message for PQerrorMessage Message-Id: <20240325163211.30777d3cdb1821d3d7cda176@magnetkern.de> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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