On 21.07.21 13:51, Max Kellermann wrote:
On 2021/07/21 13:42, Peter Eisentraut <pe...@eisentraut.org> wrote:
What specifically are you trying to check for in libpq?  Maybe there is a
better way, or we could add one.

It's about this compile-time check:

  https://github.com/CM4all/libcommon/blob/master/src/pg/Connection.hxx#L430

This is a C++ wrapper for libpq, and some users of this library run on
very old Debian versions with just libpq 8, and other users run on
Debian 11 with libpq wrapped in C++20 Coroutines, and for that they
need PQsetSingleRowMode() which is only available since version 9.

For more recently added features, libpq has feature macros such as

/* Indicates presence of PQenterPipelineMode and friends */
#define LIBPQ_HAS_PIPELINING 1
/* Indicates presence of PQsetTraceFlags; also new PQtrace output format */
#define LIBPQ_HAS_TRACE_FLAGS 1

The feature you are testing arrived in PostgreSQL 9.2, so it's too old to do anything about at this point.

Reply via email to