Improve the version message to actually show the repmgr version not

only postgresql's one
This commit is contained in:
Jaime Casanova
2012-06-25 22:53:16 -05:00
parent 861a3c8f22
commit e3c3c22b6e
3 changed files with 8 additions and 2 deletions

View File

@@ -37,6 +37,7 @@
#include "config.h"
#include "check_dir.h"
#include "strutil.h"
#include "version.h"
#define RECOVERY_FILE "recovery.conf"
#define RECOVERY_DONE_FILE "recovery.done"
@@ -125,7 +126,7 @@ main(int argc, char **argv)
}
if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
{
printf("%s (PostgreSQL) " PG_VERSION "\n", progname);
printf("%s %s (PostgreSQL %s)\n", progname, REPMGR_VERSION, PG_VERSION);
exit(SUCCESS);
}
}

View File

@@ -30,6 +30,7 @@
#include "config.h"
#include "log.h"
#include "strutil.h"
#include "version.h"
#include "access/xlogdefs.h"
#include "libpq/pqsignal.h"
@@ -131,7 +132,7 @@ main(int argc, char **argv)
}
if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
{
printf("%s (PostgreSQL) " PG_VERSION "\n", progname);
printf("%s %s (PostgreSQL %s)\n", progname, REPMGR_VERSION, PG_VERSION);
exit(SUCCESS);
}
}

4
version.h Normal file
View File

@@ -0,0 +1,4 @@
#ifndef _VERSION_H_
#define _VERSION_H_
#define REPMGR_VERSION "1.2.0"
#endif