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

From David G. Johnston
Subject Re: [HACKERS] pg_config --version-num
Date
Msg-id CAKFQuwbuLch51gJehE5aow8yzmG-J4rCLvmNy2TPQGVfbZSWeg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] pg_config --version-num  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Tue, May 30, 2017 at 6:36 PM, 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

​​Tom's comment here:

"whereas adding a pg_config option
entails quite a lot of overhead (documentation, translatable help text,
yadda yadda)."

The proposed doesn't touch the first item and patch author's aren't expected to handle the second.  Not sure what all the rest entails...but I cannot imagine it is a considerable amount of stuff that amounts to little more than boilerplate text paralleling what is already out there for the existing --version option.  If someone is willing to do that I'd think we should feel OK with the little bit of translation would that would need to occur because of it.

The fact that this is even on the radar means that more than likely there are sensible uses for this capability whether they've been adequately presented or not.  We don't have someone begging for help here but rather ultimately a complete patch that can be committed and which would require pretty much zero maintenance.

While I don't do it presently I could very well imagine value in being able to inspect installed versions PostgreSQL, including patch levels, without needing a running server process or the ability to login.

David J.

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump
Next
From: Stephen Frost
Date:
Subject: Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256