Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
6521cd9a
Commit
6521cd9a
authored
20 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Add 'static' to initdb.c file-global variables.
parent
c5159bc0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/bin/initdb/initdb.c
+47
-49
47 additions, 49 deletions
src/bin/initdb/initdb.c
with
47 additions
and
49 deletions
src/bin/initdb/initdb.c
+
47
−
49
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment