Skip to content

Commit

Permalink
Remove (redefined) macro PG_VERSION and replace with PACKAGE_VERSION
Browse files Browse the repository at this point in the history
The previous macro collided with one already defined by PostgreSQL
and on some platforms it is not always in the same form causing
lots of build warnings.
  • Loading branch information
RobAtticus committed Sep 18, 2018
1 parent c872e7e commit 8225cd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/config.h.in
Expand Up @@ -9,7 +9,6 @@
#define TIMESCALEDB_MOD_VERSION "@VERSION_MOD@"
#define BUILD_OS_NAME "@CMAKE_SYSTEM_NAME@"
#define BUILD_OS_VERSION "@CMAKE_SYSTEM_VERSION@"
#define PG_VERSION "@PG_VERSION@"
/*
* Value should be set in package release scripts. Otherwise
* defaults to "source"
Expand Down
6 changes: 5 additions & 1 deletion src/telemetry/telemetry.c
Expand Up @@ -198,7 +198,11 @@ build_version_body(void)
else
jsonb_add_pair(parseState, REQ_OS, "Unknown");

jsonb_add_pair(parseState, REQ_PS_VERSION, PG_VERSION);
/*
* PACKAGE_VERSION does not include extra details that some systems (e.g.,
* Ubuntu) sometimes include in PG_VERSION
*/
jsonb_add_pair(parseState, REQ_PS_VERSION, PACKAGE_VERSION);
jsonb_add_pair(parseState, REQ_TS_VERSION, TIMESCALEDB_VERSION_MOD);
jsonb_add_pair(parseState, REQ_BUILD_OS, BUILD_OS_NAME);
jsonb_add_pair(parseState, REQ_BUILD_OS_VERSION, BUILD_OS_VERSION);
Expand Down

0 comments on commit 8225cd2

Please sign in to comment.