Re: Package version in PG_VERSION and version()

From: Christoph Berg <christoph(dot)berg(at)credativ(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Package version in PG_VERSION and version()
Date: 2018-01-17 15:14:41
Message-ID: 20180117151441.GD23525@msg.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Re: Tom Lane 2018-01-17 <16522(dot)1516201388(at)sss(dot)pgh(dot)pa(dot)us>
> I wrote:
> > Yeah, but the same argument could be made against the variant
> > you're proposing. In theory, people could have written arbitrarily
> > brittle checks of version numbers/strings. I'm not exactly convinced
> > that it's your (or our) problem if they did.

The difference is that when parsing version() (which is all my variant
is changing), people already have to deal with extra stuff at the end
(gcc version), while that would be new for "psql --version".

> BTW, as concrete evidence in this area, we could look to what happened
> when we changed from three-part to two-part version numbers. Which
> was pretty much nothing. I've been pleasantly surprised by how little
> whining we've heard about that ;-). I think if downstream users have
> been able to survive the change from "x.y.z" to "x.y", they can probably
> manage "x.y (Debian something)".

I guess people just fixed it instead of whining. I'd want to avoid
both :)

> Maybe if you want to be careful, you
> could make the addition only in PG 10 and up, guessing that anybody
> who's really brittle in this area will be forced to improve their code
> when they go to 10 anyway.

That is an excellent idea.

Christoph
--
Senior Berater, Tel.: +49 2166 9901 187
credativ GmbH, HRB Mönchengladbach 12080, USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer
pgp fingerprint: 5C48 FE61 57F4 9179 5970 87C6 4C5A 6BAB 12D2 A7AE

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-01-17 15:28:46 Re: master make check fails on Solaris 10
Previous Message Victor Wagner 2018-01-17 15:13:59 Re: master make check fails on Solaris 10