Hi, On 2021-06-17 13:16:17 -0400, Tom Lane wrote: > > Then again, why would pg_config.h be absent? > > Likely because somebody decided it was a server-side include rather > than an application-side include.
Which is the right call - pg_config.h can't easily be included in applications that themselves use autoconf. Most problematically it defines all the standard autotools PACKAGE_* macros that are guaranteed to conflict in any autotools using project. There's obviously also a lot of other defines in there that quite possibly could conflict. We probably split pg_config.h at some point. Even for extensions it can be annoying because pg_config.h is always included in server code, which means that the extension can't easily include an autoheader style header itself. I'm not sure I understand why you think that exposing the version number for libpq is such a bad idea? I think it'd be reasonable to add a few more carefully chosen macros to pg_config_ext.h. Greetings, Andres Freund