Re: [HACKERS] pg_config --version-num - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [HACKERS] pg_config --version-num
Date
Msg-id CAMsr+YFwTW-UhH78OANrJ=2KaZfjBMAochj+B0kS-K0e52uHgA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] pg_config --version-num  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] pg_config --version-num  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers


On 31 May 2017 9:36 am, "Michael Paquier" <michael.paquier@gmail.com> wrote:
On Tue, May 30, 2017 at 6:14 PM, Craig Ringer <craig@2ndquadrant.com> wrote:
> Attached is a small patch to teach pg_config how to output a --version-num
>
> With Pg 10, parsing versions got more annoying. Especially with
> "10beta1", "9.6beta2" etc into the mix. It makes no sense to force
> tools and scripts to do this when we can just expose a sensible
> pre-formatted one at no cost to us.
>
> Personally I'd like to backpatch this into supported back branches,
> but just having it in pg 10 would be  a help.

The last threads treating about the same subject are here:
https://www.postgresql.org/message-id/CAB7nPqTAdAJpX8iK4V3uYJbO2Kmo8rHzqJKDsLaDdranNrGX_A@mail.gmail.com
https://www.postgresql.org/message-id/20161127001648.GA21874@fetter.org
Is the data in Makefile.global unsufficient?

It's a pain in the butt because then you need to find or get passed the name of Makefile.global. Then you have to template it out into a file. Or parse the Makefile. Or create a wrapper program to emit it.

It's beyond me why we don't expose this at runtime for use in scripts and tools. (Then again, the same is true of reporting it in the startup message and we know how that's gone).

pgsql-hackers by date:

Previous
From: Álvaro Hernández Tortosa
Date:
Subject: Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256
Next
From: Amit Langote
Date:
Subject: Re: [HACKERS] Adding support for Default partition in partitioning