aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2004-05-18 20:18:59 +0000
committerBruce Momjian <bruce@momjian.us>2004-05-18 20:18:59 +0000
commita9fad44372881bc3fd1a5d194d6b3f80c54ceae0 (patch)
tree743d6024f184d22e103698d401562806ad69940b /src/backend/tcop/postgres.c
parentda401bd3149a7549e67781f0e4a728c1405c53bf (diff)
downloadpostgresql-a9fad44372881bc3fd1a5d194d6b3f80c54ceae0.tar.gz
postgresql-a9fad44372881bc3fd1a5d194d6b3f80c54ceae0.zip
Move find_my_exec() way up into main.c so it is available to the
timezone code and other places. Remove elog() calls from find_my_exec; do fprintf(stderr) instead. We can then remove the exec.c handling in the makefile because it doesn't have to be built to suppress elog calls.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index f06340a54e4..77fc42e0a54 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.407 2004/05/17 14:35:31 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.408 2004/05/18 20:18:58 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -2549,6 +2549,9 @@ PostgresMain(int argc, char *argv[], const char *username)
}
Assert(DataDir);
+ if (strlen(pkglib_path) == 0)
+ get_pkglib_path(my_exec_path, pkglib_path);
+
/* Acquire configuration parameters */
if (IsUnderPostmaster)
{
@@ -2646,16 +2649,6 @@ PostgresMain(int argc, char *argv[], const char *username)
}
/*
- * On some systems our dynloader code needs the executable's pathname.
- */
- if (strlen(my_exec_path) == 0 && find_my_exec(argv[0], my_exec_path) < 0)
- ereport(FATAL,
- (errmsg("%s: could not locate postgres executable",
- argv[0])));
- if (strlen(pkglib_path) == 0)
- get_pkglib_path(my_exec_path, pkglib_path);
-
- /*
* Validate we have been given a reasonable-looking DataDir (if
* under postmaster, assume postmaster did this already).
*/