pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Provide feature-test macros for libpq features added in v14.
Date: Sat, 19 Jun 2021 15:44:50 +0000
Message-ID: <E1lud9O-0003Ns-PD@gemulon.postgresql.org> (raw)

Provide feature-test macros for libpq features added in v14.

We had a request to provide a way to test at compile time for the
availability of the new pipeline features.  More generally, it
seems like a good idea to provide a way to test via #ifdef for
all new libpq API features.  People have been using the version
from pg_config.h for that; but that's more likely to represent the
server version than the libpq version, in the increasingly-common
scenario where they're different.  It's safer if libpq-fe.h itself
is the source of truth about what features it offers.

Hence, establish a policy that starting in v14 we'll add a suitable
feature-is-present macro to libpq-fe.h when we add new API there.
(There doesn't seem to be much point in applying this policy
retroactively, but it's not too late for v14.)

Tom Lane and Alvaro Herrera, per suggestion from Boris Kolpackov.

Discussion: https://postgr.es/m/boris.20210617102439@codesynthesis.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6991e774e0304f5ef488cf1ae4fa79578b6ae3d5

Modified Files
--------------
src/interfaces/libpq/libpq-fe.h | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1lud9O-0003Ns-PD@gemulon.postgresql.org>
Permalink:  ../E1lud9O-0003Ns-PD@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lud9O-0003Ns-PD@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Provide feature-test macros for libpq features added in v14.
  In-Reply-To: <E1lud9O-0003Ns-PD@gemulon.postgresql.org>

* 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