Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit870993e

Browse files
committed
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 definitionsin initdb and pg_ctl.
1 parent8dd6c4b commit870993e

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.551 2008/01/11 00:54:09 tgl Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.552 2008/02/20 22:46:24 tgl Exp $
4141
*
4242
* NOTES
4343
*
@@ -665,7 +665,7 @@ PostmasterMain(int argc, char *argv[])
665665

666666
#ifdefEXEC_BACKEND
667667
/* Locate executable backend before we change working directory */
668-
if (find_other_exec(argv[0],"postgres",PG_VERSIONSTR,
668+
if (find_other_exec(argv[0],"postgres",PG_BACKEND_VERSIONSTR,
669669
postgres_exec_path)<0)
670670
ereport(FATAL,
671671
(errmsg("%s: could not locate matching postgres executable",

‎src/bin/initdb/initdb.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* Portions Copyright (c) 1994, Regents of the University of California
4343
* Portions taken from FreeBSD.
4444
*
45-
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.152 2008/01/01 19:45:55 momjian Exp $
45+
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.153 2008/02/20 22:46:24 tgl Exp $
4646
*
4747
*-------------------------------------------------------------------------
4848
*/
@@ -67,9 +67,6 @@ intoptreset;
6767
#endif
6868

6969

70-
/* version string we expect back from postgres */
71-
#definePG_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
72-
7370
/*
7471
* these values are passed in by makefile defines
7572
*/
@@ -2666,7 +2663,7 @@ main(int argc, char *argv[])
26662663
sprintf(pgdenv,"PGDATA=%s",pg_data);
26672664
putenv(pgdenv);
26682665

2669-
if ((ret=find_other_exec(argv[0],"postgres",PG_VERSIONSTR,
2666+
if ((ret=find_other_exec(argv[0],"postgres",PG_BACKEND_VERSIONSTR,
26702667
backend_exec))<0)
26712668
{
26722669
charfull_path[MAXPGPATH];

‎src/bin/pg_ctl/pg_ctl.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.93 2008/02/20 22:18:15 tgl Exp $
7+
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.94 2008/02/20 22:46:24 tgl Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -33,6 +33,7 @@
3333

3434
#include"libpq/pqsignal.h"
3535
#include"getopt_long.h"
36+
#include"miscadmin.h"
3637

3738
#if defined(__CYGWIN__)
3839
#include<sys/cygwin.h>
@@ -49,10 +50,6 @@ intoptreset;
4950
typedeflongpgpid_t;
5051

5152

52-
/* postgres version ident string */
53-
#definePM_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
54-
55-
5653
typedefenum
5754
{
5855
SMART_MODE,
@@ -659,7 +656,7 @@ do_start(void)
659656

660657
postmaster_path=pg_malloc(MAXPGPATH);
661658

662-
if ((ret=find_other_exec(argv0,"postgres",PM_VERSIONSTR,
659+
if ((ret=find_other_exec(argv0,"postgres",PG_BACKEND_VERSIONSTR,
663660
postmaster_path))<0)
664661
{
665662
charfull_path[MAXPGPATH];
@@ -1020,7 +1017,8 @@ pgwin32_CommandLine(bool registration)
10201017
}
10211018
else
10221019
{
1023-
ret=find_other_exec(argv0,"postgres",PM_VERSIONSTR,cmdLine);
1020+
ret=find_other_exec(argv0,"postgres",PG_BACKEND_VERSIONSTR,
1021+
cmdLine);
10241022
if (ret!=0)
10251023
{
10261024
write_stderr(_("%s: could not find postgres program executable\n"),progname);

‎src/include/miscadmin.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
1414
* Portions Copyright (c) 1994, Regents of the University of California
1515
*
16-
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.200 2008/02/17 02:09:31 tgl Exp $
16+
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.201 2008/02/20 22:46:24 tgl Exp $
1717
*
1818
* NOTES
1919
* some of the information in this file should be moved to other files.
@@ -26,7 +26,7 @@
2626
#include"pgtime.h"/* for pg_time_t */
2727

2828

29-
#definePG_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
29+
#definePG_BACKEND_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
3030

3131

3232
/*****************************************************************************

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp