Re: Add version macro to libpq-fe.h
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Boris Kolpackov <boris@codesynthesis.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Álvaro Herrera <alvaro.herrera@2ndquadrant.com>
Date: 2021-06-17T16:56:58Z
Lists: 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
Commits
-
Provide feature-test macros for libpq features added in v14.
- 6991e774e030 14.0 landed
-
Adjust batch size in postgres_fdw to not use too many parameters
- cb92703384e2 14.0 cited
-
Arrange to strip libpq.so of symbols that aren't officially supposed to
- 1e7bb2da573e 8.2.0 cited