On 2021/07/21 08:44, Peter Eisentraut <pe...@eisentraut.org> wrote: > pg_config.h should only be included when compiling server-side plugins. > Under what circumstances would such a plug-in use OpenSSL directly? Could > you explain in more detail what you are trying to do?
I did not know that - I use it to check the library version at compile time with PG_VERSION_NUM / PG_MAJORVERSION_NUM to see which features are available. This is about a client using libpq, not a server-side plugin. Obviously, PQlibVersion() is a function that can only be used at runtime, and it's too late then. Other than those macros in pg_config.h, I could not find any other compile-time way to check the libpq version.