Re: Add version macro to libpq-fe.h

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Add version macro to libpq-fe.h
Дата
Msg-id CA+TgmoY8PVB39k5d=OZ64Sv7ba0s32TXg9Vp6wLnCuO9cHM2QA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add version macro to libpq-fe.h  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Add version macro to libpq-fe.h  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Jun 17, 2021 at 9:34 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I think putting a version number as such in there is a truly
> horrid idea.  However, I could get behind adding a boolean flag
> that says specifically whether the pipeline feature exists.
> Then you'd do something like
>
> #ifdef LIBPQ_HAS_PIPELINING
>
> rather than embedding knowledge of exactly which release
> added that.

I realize that this kind of feature-based testing is generally
considered a best practice, but the problem is we're unlikely to do it
consistently. If we put a version number in there, people will be able
to test for whatever they want.

Then again, why would pg_config.h be absent?

-- 
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Unresolved repliaction hang and stop problem.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Centralizing protective copying of utility statements