Re: Include commit identifier in version() function

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pasman pasmański <pasman(dot)p(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Include commit identifier in version() function
Date: 2011-11-05 18:46:58
Message-ID: CAMkU=1x2=8ZO1PqM-ypQhVAaGaqv9cfshnhWehp-fQVvqP=pQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/10/28 Robert Haas <robertmhaas(at)gmail(dot)com>:
> 2011/10/28 pasman pasmański <pasman(dot)p(at)gmail(dot)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.

Sure, I may be compiling changes that are not committed, but still
knowing the most recent commit/checkout that did happen would have
better granularity than just "9.2devel". And if that commit hash is
not in the public repo, that is fine, as I would want such a thing for
my own use.

> 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,

That is probably true, but 99+% of the compilations and installs I do
are not intended for production use. I would be happy to see this
feature in my own dev repository, even if it never did see its way
into production. (It would already be there, if I knew of a way to
make it happen)

Cheers,

Jeff

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2011-11-06 01:58:00 [PATCH] optional cleaning queries stored in pg_stat_statements
Previous Message Martijn van Oosterhout 2011-11-05 18:20:23 Re: Strange problem with create table as select * from table;