diff options
| author | Tom Lane | 2008-02-20 22:46:24 +0000 |
|---|---|---|
| committer | Tom Lane | 2008-02-20 22:46:24 +0000 |
| commit | 870993e8717f928437dfb466901a135c63686905 (patch) | |
| tree | 57e07272400d436489e8de65a0b653b244acd8e0 /src/bin | |
| parent | 8dd6c4b4befbd084e94b17809207b2e1e349cb6c (diff) | |
Rename miscadmin.h's PG_VERSIONSTR macro to PG_BACKEND_VERSIONSTR to
make it a bit clearer what it is, and get rid of duplicate definitions
in initdb and pg_ctl.
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/initdb/initdb.c | 7 | ||||
| -rw-r--r-- | src/bin/pg_ctl/pg_ctl.c | 12 |
2 files changed, 7 insertions, 12 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index f64f344c023..f3eb38b2dc4 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -42,7 +42,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * Portions taken from FreeBSD. * - * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.152 2008/01/01 19:45:55 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.153 2008/02/20 22:46:24 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -67,9 +67,6 @@ int optreset; #endif -/* version string we expect back from postgres */ -#define PG_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n" - /* * these values are passed in by makefile defines */ @@ -2666,7 +2663,7 @@ main(int argc, char *argv[]) sprintf(pgdenv, "PGDATA=%s", pg_data); putenv(pgdenv); - if ((ret = find_other_exec(argv[0], "postgres", PG_VERSIONSTR, + if ((ret = find_other_exec(argv[0], "postgres", PG_BACKEND_VERSIONSTR, backend_exec)) < 0) { char full_path[MAXPGPATH]; diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index fe8c02700f9..bd969169298 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -4,7 +4,7 @@ * * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.93 2008/02/20 22:18:15 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.94 2008/02/20 22:46:24 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -33,6 +33,7 @@ #include "libpq/pqsignal.h" #include "getopt_long.h" +#include "miscadmin.h" #if defined(__CYGWIN__) #include <sys/cygwin.h> @@ -49,10 +50,6 @@ int optreset; typedef long pgpid_t; -/* postgres version ident string */ -#define PM_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n" - - typedef enum { SMART_MODE, @@ -659,7 +656,7 @@ do_start(void) postmaster_path = pg_malloc(MAXPGPATH); - if ((ret = find_other_exec(argv0, "postgres", PM_VERSIONSTR, + if ((ret = find_other_exec(argv0, "postgres", PG_BACKEND_VERSIONSTR, postmaster_path)) < 0) { char full_path[MAXPGPATH]; @@ -1020,7 +1017,8 @@ pgwin32_CommandLine(bool registration) } else { - ret = find_other_exec(argv0, "postgres", PM_VERSIONSTR, cmdLine); + ret = find_other_exec(argv0, "postgres", PG_BACKEND_VERSIONSTR, + cmdLine); if (ret != 0) { write_stderr(_("%s: could not find postgres program executable\n"), progname); |
