Exposing PG_VERSION_NUM in pg_config - Mailing list pgsql-hackers

From Michael Paquier
Subject Exposing PG_VERSION_NUM in pg_config
Date
Msg-id CAB7nPqTAdAJpX8iK4V3uYJbO2Kmo8rHzqJKDsLaDdranNrGX_A@mail.gmail.com
Whole thread Raw
Responses Re: Exposing PG_VERSION_NUM in pg_config  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List 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

pgsql-hackers by date:

Previous
From: Rajeev rastogi
Date:
Subject: Materialiation is slower than non-materialized
Next
From: Florian Weimer
Date:
Subject: Re: SSL renegotiation