Re: Version defines

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Version defines
Дата
Msg-id 27557.1099234921@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Version defines  (James William Pye <flaw@rhid.com>)
Ответы Re: Version defines  (James William Pye <flaw@rhid.com>)
Список pgsql-hackers
James William Pye <flaw@rhid.com> writes:
> Would it be possible to get something along the lines of the attached
> patch in 8? (major,minor,patch,state version defines)

This has been proposed and rejected before, mainly on the grounds that
it would encourage bad programming practices.

At compile time, you should be checking the specific feature you care
about, not a system version number (this is pretty much the entire point
behind Autoconf).  At run time, you need to be making a run-time test
anyway; compiling against version x.y headers does not guarantee
anything about what version you will be executing against at runtime.
        regards, tom lane


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

Предыдущее
От: Thomas Hallgren
Дата:
Сообщение: Problems with pgxs
Следующее
От: Tom Lane
Дата:
Сообщение: Re: fsync, ext2 on Linux