Re: Package version in PG_VERSION and version()

From: Christoph Berg <christoph(dot)berg(at)credativ(dot)de>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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: 2017-12-19 13:40:12
Message-ID: 20171219134012.GB6251@msg.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Re: Robert Haas 2017-12-17 <CA+Tgmoan5jER6OpGWOZZBvOgzQ5SJMpP7e2vvzhgFB4pxC33gw(at)mail(dot)gmail(dot)com>
> Unfortunately, actually modifying the main version number breaks large
> numbers of tools and drivers that think they know what a PostgreSQL
> version number looks like, as many people who work for my employer can
> testify to from personal experience with a piece of software that
> displays a non-default version number. I think --with-extra-version
> is therefore badly-designed and probably mostly useless in its current
> form, and as Christoph's example shows, it's not really adapted for
> the kind of string he wants to add. I don't really care whether we
> leave --with-extra-version as-is and add something else for the kind
> of thing Christoph wants to do, or whether we add a different thing
> that does what he wants to do, but I think it's a very good idea to
> provide something along the lines of what he wants.

My idea is to put the information in a place where it is accessible,
but not obtrusive. version() seemed to be the only place for that
(server_version is just the short version), and it already has the
compiler version, so it fits, I think.

> In short, "the version number is important enough to show" != "the
> version number is important enough to break compatibility with large
> numbers of tools and drivers".

Exactly.

Added as https://commitfest.postgresql.org/16/1418/ now.

If people think it's worth it (windows?), I'll add a configure
--switch, otherwise with just reading from $VENDOR_VERSION, it's a
one-liner.

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-12-19 13:44:34 Re: Using ProcSignal to get memory context stats from a running backend
Previous Message Alvaro Herrera 2017-12-19 13:34:02 Re: Notes about Pl/PgSQL assignment performance