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
ee814b45
Commit
ee814b45
authored
Nov 29, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Have initdb display relative paths to start postmaster if used to invoke
initdb, and display in a path-native way.
parent
db086aa9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
src/bin/initdb/initdb.c
src/bin/initdb/initdb.c
+16
-5
No files found.
src/bin/initdb/initdb.c
View file @
ee814b45
...
...
@@ -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.6
8 2004/11/27 18:51:05 tgl
Exp $
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.6
9 2004/11/29 01:14:45 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -216,8 +216,10 @@ do { \
#ifndef WIN32
#define QUOTE_PATH ""
#define DIR_SEP "/"
#else
#define QUOTE_PATH "\""
#define DIR_SEP "\\"
#endif
/*
...
...
@@ -2079,6 +2081,8 @@ main(int argc, char *argv[])
char
*
short_version
;
char
*
pgdenv
;
/* PGDATA value gotten from and sent to
* environment */
char
bin_dir
[
MAXPGPATH
];
char
*
pg_data_native
;
static
const
char
*
subdirs
[]
=
{
"global"
,
"pg_xlog"
,
...
...
@@ -2256,6 +2260,7 @@ main(int argc, char *argv[])
}
}
pg_data_native
=
pg_data
;
canonicalize_path
(
pg_data
);
/*
...
...
@@ -2567,12 +2572,18 @@ main(int argc, char *argv[])
if
(
authwarning
!=
NULL
)
fprintf
(
stderr
,
authwarning
);
/* Get directory specification used to start this executable */
strcpy
(
bin_dir
,
argv
[
0
]);
get_parent_directory
(
bin_dir
);
printf
(
_
(
"
\n
Success. You can now start the database server using:
\n\n
"
" %s%s%s
/
postmaster -D %s%s%s
\n
"
" %s%s%s
%s
postmaster -D %s%s%s
\n
"
"or
\n
"
" %s%s%s/pg_ctl -D %s%s%s -l logfile start
\n\n
"
),
QUOTE_PATH
,
bin_path
,
QUOTE_PATH
,
QUOTE_PATH
,
pg_data
,
QUOTE_PATH
,
QUOTE_PATH
,
bin_path
,
QUOTE_PATH
,
QUOTE_PATH
,
pg_data
,
QUOTE_PATH
);
" %s%s%s%spg_ctl -D %s%s%s -l logfile start
\n\n
"
),
QUOTE_PATH
,
bin_dir
,
QUOTE_PATH
,
(
strlen
(
bin_dir
)
>
0
)
?
DIR_SEP
:
""
,
QUOTE_PATH
,
pg_data_native
,
QUOTE_PATH
,
QUOTE_PATH
,
bin_dir
,
QUOTE_PATH
,
(
strlen
(
bin_dir
)
>
0
)
?
DIR_SEP
:
""
,
QUOTE_PATH
,
pg_data_native
,
QUOTE_PATH
);
return
0
;
}
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