Re: Exposing PG_VERSION_NUM in pg_config

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: Exposing PG_VERSION_NUM in pg_config
Дата
Msg-id 87wq2786y4.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: Exposing PG_VERSION_NUM in pg_config  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Exposing PG_VERSION_NUM in pg_config  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
>>>>> "Michael" == Michael Paquier <michael.paquier@gmail.com> writes:
>> MAJORVERSION is defined in Makefile.global as included by PGXS, fwiw.
Michael> Well, my point is to have something on which you can directlyMichael> apply maths on without changing its
shape;)
 

There's this trick:

# if version < 9.1 ...
ifeq ($(filter-out 7.% 8.% 9.0, $(MAJORVERSION)),)
# stuff
endif

# if version >= 9.3
ifneq ($(filter-out 7.% 8.% 9.0 9.1 9.2, $(MAJORVERSION)),)
# stuff
endif

-- 
Andrew (irc:RhodiumToad)



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

Предыдущее
От: Rajeev rastogi
Дата:
Сообщение: Re: Materialiation is slower than non-materialized
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Abbreviated keys for Numeric