diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-05-13 22:45:04 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-05-13 22:45:04 +0000 |
commit | f69ecb4f8cbf0f1d1638f9fb01d8845a5c84a3c0 (patch) | |
tree | 32a0c064a21d0e6837fb19132132ccc4f14e3dc2 /src/backend/tcop/postgres.c | |
parent | 261eda55d3473f4da3c60e09b4f9823688121593 (diff) | |
download | postgresql-f69ecb4f8cbf0f1d1638f9fb01d8845a5c84a3c0.tar.gz postgresql-f69ecb4f8cbf0f1d1638f9fb01d8845a5c84a3c0.zip |
Reorganize backend code to more cleanly manage executable names and
backend startup.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 4c006f00b8b..97c4d1dde16 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.404 2004/05/12 13:38:40 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.405 2004/05/13 22:45:03 momjian Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -2159,7 +2159,7 @@ PostgresMain(int argc, char *argv[], const char *username) } if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0) { - puts("postgres (PostgreSQL) " PG_VERSION); + puts(PG_VERSIONSTR); exit(0); } } @@ -2646,14 +2646,12 @@ PostgresMain(int argc, char *argv[], const char *username) } /* - * On some systems our dynloader code needs the executable's - * pathname. (If under postmaster, this was done already.) + * On some systems our dynloader code needs the executable's pathname. */ - if (find_my_exec(pg_pathname, argv[0]) < 0) + if (strlen(my_exec_path) == 0 && find_my_exec(my_exec_path, argv[0]) < 0) ereport(FATAL, (errmsg("%s: could not locate postgres executable", argv[0]))); - /* * Validate we have been given a reasonable-looking DataDir (if * under postmaster, assume postmaster did this already). |