Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
9f944f04
Commit
9f944f04
authored
May 14, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust find_my_exec/find_other_exec() so that the return parameter is
last, not first. This fits our style better.
parent
550735cd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
20 deletions
+20
-20
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+3
-3
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+2
-2
src/bin/initdb/initdb.c
src/bin/initdb/initdb.c
+3
-3
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_dump/pg_dumpall.c
+3
-3
src/include/port.h
src/include/port.h
+4
-4
src/port/exec.c
src/port/exec.c
+5
-5
No files found.
src/backend/postmaster/postmaster.c
View file @
9f944f04
...
...
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.38
6 2004/05/13 22:45:02
momjian Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.38
7 2004/05/14 17:04:44
momjian Exp $
*
* NOTES
*
...
...
@@ -693,13 +693,13 @@ PostmasterMain(int argc, char *argv[])
/*
* On some systems our dynloader code needs the executable's pathname.
*/
if
(
find_my_exec
(
my_exec_path
,
argv
[
0
]
)
<
0
)
if
(
find_my_exec
(
argv
[
0
],
my_exec_path
)
<
0
)
ereport
(
FATAL
,
(
errmsg
(
"%s: could not locate my own executable path"
,
progname
)));
#ifdef EXEC_BACKEND
if
(
find_other_exec
(
postgres_exec_path
,
argv
[
0
],
"postgres"
,
PG_VERSIONSTR
)
<
0
)
if
(
find_other_exec
(
argv
[
0
],
"postgres"
,
PG_VERSIONSTR
,
postgres_exec_path
)
<
0
)
ereport
(
FATAL
,
(
errmsg
(
"%s: could not locate postgres executable or non-matching version"
,
progname
)));
...
...
src/backend/tcop/postgres.c
View file @
9f944f04
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.40
5 2004/05/13 22:45:03
momjian Exp $
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.40
6 2004/05/14 17:04:45
momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -2648,7 +2648,7 @@ 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
(
my_exec_path
,
argv
[
0
]
)
<
0
)
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
])));
...
...
src/bin/initdb/initdb.c
View file @
9f944f04
...
...
@@ -39,7 +39,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
*
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.2
8 2004/05/12 13:38:42
momjian Exp $
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.2
9 2004/05/14 17:04:46
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1932,8 +1932,8 @@ main(int argc, char *argv[])
sprintf
(
pgdenv
,
"PGDATA=%s"
,
pg_data
);
putenv
(
pgdenv
);
if
((
ret
=
find_other_exec
(
backendbin
,
argv
[
0
],
"postgres"
,
PG_VERSIONSTR
))
<
0
)
if
((
ret
=
find_other_exec
(
argv
[
0
],
"postgres"
,
PG_VERSIONSTR
,
backendbin
))
<
0
)
{
if
(
ret
==
-
1
)
fprintf
(
stderr
,
...
...
src/bin/pg_dump/pg_dumpall.c
View file @
9f944f04
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.3
2 2004/05/12 13:38:44
momjian Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.3
3 2004/05/14 17:04:47
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -123,8 +123,8 @@ main(int argc, char *argv[])
}
}
if
((
ret
=
find_other_exec
(
pg_dump_bin
,
argv
[
0
],
"pg_dump"
,
PG_VERSIONSTR
))
<
0
)
if
((
ret
=
find_other_exec
(
argv
[
0
],
"pg_dump"
,
PG_VERSIONSTR
,
pg_dump_bin
))
<
0
)
{
if
(
ret
==
-
1
)
fprintf
(
stderr
,
...
...
src/include/port.h
View file @
9f944f04
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/port.h,v 1.3
0 2004/05/12 13:38:48
momjian Exp $
* $PostgreSQL: pgsql/src/include/port.h,v 1.3
1 2004/05/14 17:04:47
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -28,9 +28,9 @@ extern void canonicalize_path(char *path);
extern
const
char
*
get_progname
(
const
char
*
argv0
);
/* Portable way to find binaries */
extern
int
find_my_exec
(
c
har
*
full_path
,
const
char
*
argv0
);
extern
int
find_other_exec
(
c
har
*
retpath
,
const
char
*
argv0
,
char
const
*
target
,
const
char
*
versionstr
);
extern
int
find_my_exec
(
c
onst
char
*
argv0
,
char
*
full_path
);
extern
int
find_other_exec
(
c
onst
char
*
argv0
,
char
const
*
target
,
const
char
*
versionstr
,
char
*
retpath
);
#if defined(__CYGWIN__) || defined(WIN32)
#define EXE ".exe"
...
...
src/port/exec.c
View file @
9f944f04
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/exec.c,v 1.
4 2004/05/13 22:45:04
momjian Exp $
* $PostgreSQL: pgsql/src/port/exec.c,v 1.
5 2004/05/14 17:04:48
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -177,7 +177,7 @@ validate_exec(char *path)
* non-threaded binaries, not in library routines.
*/
int
find_my_exec
(
c
har
*
full_path
,
const
char
*
argv0
)
find_my_exec
(
c
onst
char
*
argv0
,
char
*
full_path
)
{
char
buf
[
MAXPGPATH
+
2
];
char
*
p
;
...
...
@@ -272,14 +272,14 @@ find_my_exec(char *full_path, const char *argv0)
* Find our binary directory, then make sure the "target" executable
* is the proper version.
*/
int
find_other_exec
(
c
har
*
retpath
,
const
char
*
argv0
,
char
const
*
target
,
const
char
*
versionstr
)
int
find_other_exec
(
c
onst
char
*
argv0
,
char
const
*
target
,
const
char
*
versionstr
,
char
*
retpath
)
{
char
cmd
[
MAXPGPATH
];
char
line
[
100
];
FILE
*
pgver
;
if
(
find_my_exec
(
retpath
,
argv0
)
<
0
)
if
(
find_my_exec
(
argv0
,
retpath
)
<
0
)
return
-
1
;
/* Trim off program name and keep just directory */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment