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
6521cd9a
Commit
6521cd9a
authored
Mar 11, 2005
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'static' to initdb.c file-global variables.
parent
c5159bc0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
49 deletions
+47
-49
src/bin/initdb/initdb.c
src/bin/initdb/initdb.c
+47
-49
No files found.
src/bin/initdb/initdb.c
View file @
6521cd9a
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
* Portions taken from FreeBSD.
*
*
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.7
7 2005/03/07 04:30:55
momjian Exp $
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.7
8 2005/03/11 15:36:27
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -71,62 +71,60 @@ int optreset;
...
@@ -71,62 +71,60 @@ int optreset;
/*
/*
* these values are passed in by makefile defines
* these values are passed in by makefile defines
*/
*/
char
*
share_path
=
NULL
;
static
char
*
share_path
=
NULL
;
/* values to be obtained from arguments */
/* values to be obtained from arguments */
char
*
pg_data
=
""
;
static
char
*
pg_data
=
""
;
char
*
encoding
=
""
;
static
char
*
encoding
=
""
;
char
*
locale
=
""
;
static
char
*
locale
=
""
;
char
*
lc_collate
=
""
;
static
char
*
lc_collate
=
""
;
char
*
lc_ctype
=
""
;
static
char
*
lc_ctype
=
""
;
char
*
lc_monetary
=
""
;
static
char
*
lc_monetary
=
""
;
char
*
lc_numeric
=
""
;
static
char
*
lc_numeric
=
""
;
char
*
lc_time
=
""
;
static
char
*
lc_time
=
""
;
char
*
lc_messages
=
""
;
static
char
*
lc_messages
=
""
;
char
*
username
=
""
;
static
char
*
username
=
""
;
bool
pwprompt
=
false
;
static
bool
pwprompt
=
false
;
char
*
pwfilename
=
NULL
;
static
char
*
pwfilename
=
NULL
;
char
*
authmethod
=
""
;
static
char
*
authmethod
=
""
;
bool
debug
=
false
;
static
bool
debug
=
false
;
bool
noclean
=
false
;
static
bool
noclean
=
false
;
bool
show_setting
=
false
;
static
bool
show_setting
=
false
;
/* internal vars */
/* internal vars */
const
char
*
progname
;
static
const
char
*
progname
;
char
*
postgres
;
static
char
*
encodingid
=
"0"
;
char
*
encodingid
=
"0"
;
static
char
*
bki_file
;
char
*
bki_file
;
static
char
*
desc_file
;
char
*
desc_file
;
static
char
*
hba_file
;
char
*
hba_file
;
static
char
*
ident_file
;
char
*
ident_file
;
static
char
*
conf_file
;
char
*
conf_file
;
static
char
*
conversion_file
;
char
*
conversion_file
;
static
char
*
info_schema_file
;
char
*
info_schema_file
;
static
char
*
features_file
;
char
*
features_file
;
static
char
*
system_views_file
;
char
*
system_views_file
;
static
char
*
effective_user
;
char
*
effective_user
;
static
bool
made_new_pgdata
=
false
;
bool
testpath
=
true
;
static
bool
found_existing_pgdata
=
false
;
bool
made_new_pgdata
=
false
;
static
char
infoversion
[
100
];
bool
found_existing_pgdata
=
false
;
static
bool
caught_signal
=
false
;
char
infoversion
[
100
];
static
bool
output_failed
=
false
;
bool
caught_signal
=
false
;
static
int
output_errno
=
0
;
bool
output_failed
=
false
;
int
output_errno
=
0
;
/* defaults */
/* defaults */
int
n_connections
=
10
;
static
int
n_connections
=
10
;
int
n_buffers
=
50
;
static
int
n_buffers
=
50
;
/*
/*
* Warning messages for authentication methods
* Warning messages for authentication methods
*/
*/
char
*
authtrust_warning
=
\
#define AUTHTRUST_WARNING
\
"# CAUTION: Configuring the system for local
\"
trust
\"
authentication allows
\n
"
"# CAUTION: Configuring the system for local \"trust\" authentication allows\n"
\
"# any local user to connect as any PostgreSQL user, including the database
\n
"
"# any local user to connect as any PostgreSQL user, including the database\n"
\
"# superuser. If you do not trust all your local users, use another
\n
"
"# superuser. If you do not trust all your local users, use another\n"
\
"# authentication method.
\n
"
;
"# authentication method.\n"
char
*
authwarning
=
NULL
;
static
char
*
authwarning
=
NULL
;
/*
/*
* Centralized knowledge of switches to pass to backend
* Centralized knowledge of switches to pass to backend
...
@@ -140,8 +138,8 @@ static const char *backend_options = "-F -O -c search_path=pg_catalog -c exit_on
...
@@ -140,8 +138,8 @@ static const char *backend_options = "-F -O -c search_path=pg_catalog -c exit_on
/* path to 'initdb' binary directory */
/* path to 'initdb' binary directory */
char
bin_path
[
MAXPGPATH
];
static
char
bin_path
[
MAXPGPATH
];
char
backend_exec
[
MAXPGPATH
];
static
char
backend_exec
[
MAXPGPATH
];
static
void
*
xmalloc
(
size_t
size
);
static
void
*
xmalloc
(
size_t
size
);
static
char
*
xstrdup
(
const
char
*
s
);
static
char
*
xstrdup
(
const
char
*
s
);
...
@@ -1210,7 +1208,7 @@ setup_config(void)
...
@@ -1210,7 +1208,7 @@ setup_config(void)
conflines
=
replace_token
(
conflines
,
conflines
=
replace_token
(
conflines
,
"@authcomment@"
,
"@authcomment@"
,
strcmp
(
authmethod
,
"trust"
)
?
""
:
authtrust_warning
);
strcmp
(
authmethod
,
"trust"
)
?
""
:
AUTHTRUST_WARNING
);
snprintf
(
path
,
sizeof
(
path
),
"%s/pg_hba.conf"
,
pg_data
);
snprintf
(
path
,
sizeof
(
path
),
"%s/pg_hba.conf"
,
pg_data
);
...
...
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