mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-18 03:23:37 +08:00
The command `get_git_commit` shows quite a little information and especially if mistakes are made it is hard to verify what the binary is actually based on. This commit extends the function to provide some more information: specifically the SHA of the HEAD regardless of whether there is a tag on it or not and the time for the HEAD commit. ``` postgres=# select * from _timescaledb_internal.get_git_commit(); commit_tag | commit_hash | commit_time --------------------------+-------------+------------------------ 1.7.4-10-g09b0b778-dirty | 09b0b778 | 2020-09-13 17:50:38+02 (1 row) ``` If git is not installed, the function `get_git_commit` will return an error indicating that no git information is available. If some of the fields are available, they will be emitted and the remaining fields will be NULL. Fixes #2457