Re: Exposing PG_VERSION_NUM in pg_config

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Exposing PG_VERSION_NUM in pg_config
Дата
Msg-id 24730.1427828974@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Exposing PG_VERSION_NUM in pg_config  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Exposing PG_VERSION_NUM in pg_config  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> On Tue, Mar 31, 2015 at 9:40 AM, Peter Eisentraut <peter_e@gmx.net> wrote:
>> I'm interested in the exact syntax you'd use, to compare it to the
>> currently used techniques.

> With the presence of VERSION_NUM directly in pg_config, the following
> expression:
> VERSION_NUM=$(shell $(PG_CONFIG) --version-num)

> With its presence in Makefile.global, that's close to what you can do with
> pg_config.h already:
> VERSION_NUM := $(shell cat `$(PG_CONFIG) --libdir`/pgxs/src/Makefile.global
> \
>     | perl -ne 'print $$1 and exit if /VERSION_NUM =\s+(\d+)/')
> But that looks a little bit magic..

I'm confused.  If PG_VERSION_NUM is defined in Makefile.global, surely
you don't need anything at all to make use of it in extension makefiles.
        regards, tom lane



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: clang -fsanitize=undefined error in ecpg
Следующее
От: David Fetter
Дата:
Сообщение: Re: Bug fix for missing years in make_date()