]> granicus.if.org Git - postgresql/commitdiff
Rename miscadmin.h's PG_VERSIONSTR macro to PG_BACKEND_VERSIONSTR to
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 20 Feb 2008 22:46:24 +0000 (22:46 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 20 Feb 2008 22:46:24 +0000 (22:46 +0000)
make it a bit clearer what it is, and get rid of duplicate definitions
in initdb and pg_ctl.

src/backend/postmaster/postmaster.c
src/bin/initdb/initdb.c
src/bin/pg_ctl/pg_ctl.c
src/include/miscadmin.h

index fe1ed795f91666b929711656704d0b6f54ce9c4e..2c481f93bbf3b9b1333848930058f32d24f86876 100644 (file)
@@ -37,7 +37,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.551 2008/01/11 00:54:09 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.552 2008/02/20 22:46:24 tgl Exp $
  *
  * NOTES
  *
@@ -665,7 +665,7 @@ PostmasterMain(int argc, char *argv[])
 
 #ifdef EXEC_BACKEND
        /* Locate executable backend before we change working directory */
-       if (find_other_exec(argv[0], "postgres", PG_VERSIONSTR,
+       if (find_other_exec(argv[0], "postgres", PG_BACKEND_VERSIONSTR,
                                                postgres_exec_path) < 0)
                ereport(FATAL,
                                (errmsg("%s: could not locate matching postgres executable",
index f64f344c0232d39db456d198d6e400be3d759bc2..f3eb38b2dc42083e97fdab3170e3609d9dd60246 100644 (file)
@@ -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];
index fe8c02700f9501d07c9a5efccfcc98dd31faf6d0..bd969169298a4c2826c82230ac6e08f886ee2fca 100644 (file)
@@ -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);
index 75a7e1f7f7cbb7cb178d83ff01cb29c37eeca143..d06b34be437401705a9b3a69008ecae6a50bc140 100644 (file)
@@ -13,7 +13,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.200 2008/02/17 02:09:31 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.201 2008/02/20 22:46:24 tgl Exp $
  *
  * NOTES
  *       some of the information in this file should be moved to other files.
@@ -26,7 +26,7 @@
 #include "pgtime.h"                            /* for pg_time_t */
 
 
-#define PG_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
+#define PG_BACKEND_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
 
 
 /*****************************************************************************