Re: Add version macro to libpq-fe.h - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Add version macro to libpq-fe.h
Date
Msg-id 517462ED-0533-44D4-B3ED-35BBD53FC6ED@yesql.se
Whole thread Raw
In response to Re: Add version macro to libpq-fe.h  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> On 17 Jun 2021, at 19:16, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> A more critical point is that if pg_config is present, it'll likely
> contain the server version, which might not have a lot to do with the
> libpq version.  Debian's already shipping things in a way that decouples
> those, and I gather Red Hat is moving in that direction too.
>
> I think what people really want to know is "if I try to call
> PQenterPipelineMode, will that compile?".

I think this is the most compelling argument for feature-based gating rather
than promote version based.  +1 on doing "#ifdef LIBPQ_HAS_PIPELINING" or along
those lines and try to be consistent going forward.  If we've truly failed to
do so in X releases time, then we can revisit this.

--
Daniel Gustafsson        https://vmware.com/




pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Centralizing protective copying of utility statements
Next
From: Robert Haas
Date:
Subject: Re: Add version macro to libpq-fe.h