On Wed, July 17, 2013 05:27, Tom Lane wrote: > Michael Paquier <michael.paqu...@gmail.com> writes: >> It happens that I work occasionally on multiple builds based on
FWIW, I've been doing this for while: where $project is mostly the patchname, $commit_hash is extracted like this: commit_hash=$( cd /home/aardvark/pg_stuff/git/master; git log | head -n 1 | cut --delimiter=" " -f 2 ); version_string=${project}-${db_timestamp}-${commit_hash}; perl -i.original -ne " s,(PACKAGE_.*[[:digit:]]+\.[[:digit:]]+(?:\.[[:digit:]]+)?(?:devel)?(?:(?:alpha|beta|rc)[[:digit:]]+)?),\\1-${version_string},; print;" configure Which will then give: PostgreSQL 9.4devel-HEAD-20130717_0828-ffcf654547ef38555203e6d716f47b7065a0a87d on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.1, 64-bit Btw, in an even more ugly hack I also stick some of that same config data in information_schema.sql_packages, with a feature_id >= 100: select * from information_schema.sql_packages where cast(substring(feature_id from E'^PKG([[:digit:]]+)') as integer) >= 100 feature_id | feature_name | is_supported | is_verified_by | comments ------------+--------------------+--------------+----------------+---------------------------------------------------------------------- PKG100 | project name | YES | ej | HEAD PKG101 | patched | NO | ej | NO PKG103 | build time | YES | ej | 2013-07-17 08:32:03.400521+02 PKG104 | server_version | YES | ej | 9.4devel-HEAD-20130717_0828-ffcf654547ef38555203e6d716f47b7065a0a87d PKG105 | server_version_num | YES | ej | 90400 PKG106 | port | YES | ej | 6544 PKG110 | commit hash | YES | ej | ffcf654547ef38555203e6d716f47b7065a0a87d PKG111 | catversion | YES | ej | 201307161 PKG112 | control version | YES | ej | 937 (9 rows) Needless to say, YMMV ... Thanks, Erik Rijkers -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers