Re: [HACKERS] pg_config --version-num

2017-05-30 Thread David G. Johnston
On Tue, May 30, 2017 at 8:07 PM, Tom Lane wrote: > Hm, but with this you're trading that problem for "is the right version > of pg_config in my PATH?". > That is probably a solved problem for those who are parsing the output of --version today. ​ > > This idea might well be

Re: [HACKERS] pg_config --version-num

2017-05-30 Thread David G. Johnston
On Tue, May 30, 2017 at 6:36 PM, Michael Paquier wrote: > On Tue, May 30, 2017 at 6:14 PM, Craig Ringer > wrote: > > Attached is a small patch to teach pg_config how to output a > --version-num > > > > With Pg 10, parsing versions got more

Re: [HACKERS] pg_config --version-num

2017-05-30 Thread Tom Lane
Craig Ringer writes: > On 31 May 2017 9:36 am, "Michael Paquier" wrote: >> 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

Re: [HACKERS] pg_config --version-num

2017-05-30 Thread Craig Ringer
On 31 May 2017 9:36 am, "Michael Paquier" wrote: On Tue, May 30, 2017 at 6:14 PM, Craig Ringer 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

Re: [HACKERS] pg_config --version-num

2017-05-30 Thread Michael Paquier
On Tue, May 30, 2017 at 6:14 PM, Craig Ringer 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

[HACKERS] pg_config --version-num

2017-05-30 Thread Craig Ringer
Hi all 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

Re: [HACKERS] pg_config --version

2016-11-27 Thread David Fetter
On Sun, Nov 27, 2016 at 09:12:47AM -0600, Jim Nasby wrote: > On 11/27/16 12:16 AM, Michael Paquier wrote: > > date: Thu, 2 Jul 2015 17:24:36 -0400 > > Make numeric form of PG version number readily available in Makefiles. > > If you don't want to wait for that, I wonder whether a back-patch to

Re: [HACKERS] pg_config --version

2016-11-27 Thread David Fetter
On Sun, Nov 27, 2016 at 03:16:37PM +0900, Michael Paquier wrote: > On Sun, Nov 27, 2016 at 9:16 AM, David Fetter wrote: > > While updating some extensions, I noticed that pg_config --version > > produces output that's...maybe not quite as useful as it might be, at > > least to a

Re: [HACKERS] pg_config --version

2016-11-27 Thread Jim Nasby
On 11/27/16 12:16 AM, Michael Paquier wrote: date: Thu, 2 Jul 2015 17:24:36 -0400 Make numeric form of PG version number readily available in Makefiles. If you don't want to wait for that, you can use [1] in shell or Make to accomplish something similar. Looks like there is a dotted

Re: [HACKERS] pg_config --version

2016-11-26 Thread Michael Paquier
On Sun, Nov 27, 2016 at 9:16 AM, David Fetter wrote: > While updating some extensions, I noticed that pg_config --version > produces output that's...maybe not quite as useful as it might be, at > least to a machine, so I'd like to throw out some proposals to fix the > situation.

[HACKERS] pg_config --version

2016-11-26 Thread David Fetter
Folks, While updating some extensions, I noticed that pg_config --version produces output that's...maybe not quite as useful as it might be, at least to a machine, so I'd like to throw out some proposals to fix the situation. Add a --version-numeric option to pg_config or Replace the