pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan Behrens <jbe-mlist@magnetkern.de>
To: pgsql-docs@lists.postgresql.org
Subject: Unclear which libpq functions set an error message for PQerrorMessage
Date: Mon, 25 Mar 2024 16:32:11 +0100
Message-ID: <20240325163211.30777d3cdb1821d3d7cda176@magnetkern.de> (raw)

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





Message-ID: <20240325163211.30777d3cdb1821d3d7cda176@magnetkern.de>
Permalink:  ../20240325163211.30777d3cdb1821d3d7cda176@magnetkern.de/
Also on:    postgresql.org/message-id/20240325163211.30777d3cdb1821d3d7cda176@magnetkern.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: jbe-mlist@magnetkern.de, pgsql-docs@lists.postgresql.org
  Subject: Re: Unclear which libpq functions set an error message for PQerrorMessage
  In-Reply-To: <20240325163211.30777d3cdb1821d3d7cda176@magnetkern.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox