Exposing PG_VERSION_NUM in pg_config

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Exposing PG_VERSION_NUM in pg_config
Date: 2015-03-23 11:50:40
Message-ID: CAB7nPqTAdAJpX8iK4V3uYJbO2Kmo8rHzqJKDsLaDdranNrGX_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

When working on extensions or packaging, one can do some grep-ing on
pg_config.h to get PG_VERSION_NUM to do version-related operations. An
example of that is the Makefile of plv8 using --include-dir with perl
and a regex:
https://github.com/plv8/plv8/blob/master/Makefile
Wouldn't it be more simple to expose PG_VERSION_NUM in pg_config with
a new option? Like that for example:
$ pg_config --version-num
90500

Attached is a patch implementing the idea.
Regards,
--
Michael

Attachment Content-Type Size
20150323_pgconfig_version_num.patch application/x-patch 1.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Weimer 2015-03-23 12:19:25 Re: SSL renegotiation
Previous Message Rajeev rastogi 2015-03-23 10:01:40 Materialiation is slower than non-materialized