Re: Exposing PG_VERSION_NUM in pg_config

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Exposing PG_VERSION_NUM in pg_config
Date: 2015-03-24 02:33:26
Message-ID: 87wq2786y4.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Michael" == Michael Paquier <michael(dot)paquier(at)gmail(dot)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 directly
Michael> 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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-03-24 02:36:37 Re: Abbreviated keys for Numeric
Previous Message Rajeev rastogi 2015-03-24 02:31:42 Re: Materialiation is slower than non-materialized