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

From Robert Haas
Subject Re: Add version macro to libpq-fe.h
Date
Msg-id CA+TgmoY8PVB39k5d=OZ64Sv7ba0s32TXg9Vp6wLnCuO9cHM2QA@mail.gmail.com
Whole thread Raw
In response to Re: Add version macro to libpq-fe.h  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Add version macro to libpq-fe.h
List pgsql-hackers
On Thu, Jun 17, 2021 at 9:34 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I think putting a version number as such in there is a truly
> horrid idea.  However, I could get behind adding a boolean flag
> that says specifically whether the pipeline feature exists.
> Then you'd do something like
>
> #ifdef LIBPQ_HAS_PIPELINING
>
> rather than embedding knowledge of exactly which release
> added that.

I realize that this kind of feature-based testing is generally
considered a best practice, but the problem is we're unlikely to do it
consistently. If we put a version number in there, people will be able
to test for whatever they want.

Then again, why would pg_config.h be absent?

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Unresolved repliaction hang and stop problem.
Next
From: Tom Lane
Date:
Subject: Re: Centralizing protective copying of utility statements