Re: Include commit identifier in version() function - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Include commit identifier in version() function
Date
Msg-id CA+TgmoZVPBaUbxu=jJjXXXiyEno6zWUhXpd6Rtfxt5-Qrn5MCQ@mail.gmail.com
Whole thread Raw
In response to Include commit identifier in version() function  (pasman pasmański <pasman.p@gmail.com>)
Responses Re: Include commit identifier in version() function  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
2011/10/28 pasman pasmański <pasman.p@gmail.com>:
> I think, it be useful to include in version() function a hexadecimal
> identifier of commit, for fast checkout to it in git.

It's sort of impossible to make this accurate, though.  You may have
patched your tree but not created a commit with those changes before
you build; or if you have created a commit it may very well not be one
that's in the public repo, but just something on our system.
Moreover, there's no real guarantee that you're compiling from a git
tree at all; you could well be compiling from a tarball.

All in all I feel like this is a solution in search of a problem.
People shouldn't be using anything other than a released version in
production, or if they do, they should take it upon themselves to
version-stamp it appropriately.  An automated solution will probably
not be reliable, and probably will create all sorts of build-system
headaches.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: TOAST versus VACUUM, or "missing chunk number 0 for toast value" identified
Next
From: Tom Lane
Date:
Subject: Re: So, is COUNT(*) fast now?