pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Provide feature-test macros for libpq features added in v14. 3+ messages / 1 participants [nested] [flat]
* pgsql: Provide feature-test macros for libpq features added in v14. @ 2021-06-19 15:44 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2021-06-19 15:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Provide feature-test macros for libpq features added in v17. @ 2024-08-23 14:13 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2024-08-23 14:13 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Provide feature-test macros for libpq features added in v17. As per the policy established in commit 6991e774e, invent macros that can be tested at compile time to detect presence of new libpq features. This should make calling code more readable and less error-prone than checking the libpq version would be (especially since we don't expose that at compile time; the server version is an unreliable substitute). Discussion: https://postgr.es/m/2042418.1724346970@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ff59d5d2cff32cfe88131f87b6c401970d449c08 Modified Files -------------- src/interfaces/libpq/libpq-fe.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Provide feature-test macros for libpq features added in v17. @ 2024-08-23 14:13 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2024-08-23 14:13 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Provide feature-test macros for libpq features added in v17. As per the policy established in commit 6991e774e, invent macros that can be tested at compile time to detect presence of new libpq features. This should make calling code more readable and less error-prone than checking the libpq version would be (especially since we don't expose that at compile time; the server version is an unreliable substitute). Discussion: https://postgr.es/m/2042418.1724346970@sss.pgh.pa.us Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/79c3012dc2311bdaa4bb135d871d16f103a62966 Modified Files -------------- src/interfaces/libpq/libpq-fe.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-08-23 14:13 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-06-19 15:44 pgsql: Provide feature-test macros for libpq features added in v14. Tom Lane <tgl@sss.pgh.pa.us> 2024-08-23 14:13 pgsql: Provide feature-test macros for libpq features added in v17. Tom Lane <tgl@sss.pgh.pa.us> 2024-08-23 14:13 pgsql: Provide feature-test macros for libpq features added in v17. Tom Lane <tgl@sss.pgh.pa.us>
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