diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-05-11 21:57:15 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-05-11 21:57:15 +0000 |
commit | fda15b351a8d5ac085e309ceda25e3a71cca27d7 (patch) | |
tree | 14329482d138feded83642194d280405ff4c070b /src/backend/tcop/postgres.c | |
parent | 270c9aa34ad0448806ece6eb04f44bd60a5519dc (diff) | |
download | postgresql-fda15b351a8d5ac085e309ceda25e3a71cca27d7.tar.gz postgresql-fda15b351a8d5ac085e309ceda25e3a71cca27d7.zip |
As part of the work for making relocatable installs, I have re-factored
all the code that looks for other binaries. I move FindExec into
port/exec.c (and renamed it to find_my_binary()). I also added
find_other_binary that looks for another binary in the same directory as
the calling program, and checks the version string.
The only behavior change was that initdb and pg_dump would look in the
hard-coded bindir directory if it can't find the requested binary in the
same directory as the caller. The new code throws an error. The old
behavior seemed too error prone for version mismatches.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 89ec36287c7..caeef3cd570 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.402 2004/05/07 01:53:41 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.403 2004/05/11 21:57:14 momjian Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -2649,7 +2649,7 @@ 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.) */ - if (FindExec(pg_pathname, argv[0], "postgres") < 0) + if (find_my_binary(pg_pathname, argv[0], "postgres") < 0) ereport(FATAL, (errmsg("%s: could not locate postgres executable", argv[0]))); |