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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Provide feature-test macros for libpq features added in v14.
Дата
Msg-id E1lud9O-0003Ns-PD@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: pgsql: Handle no replica identity index case in RelationGetIdentityKeyB
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Stabilize test case added by commit f61db909d.