Re: Add version macro to libpq-fe.h
От | Andres Freund |
---|---|
Тема | Re: Add version macro to libpq-fe.h |
Дата | |
Msg-id | 20210617183411.2taf6r32kftvfnb3@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: Add version macro to libpq-fe.h (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Add version macro to libpq-fe.h
|
Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: