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
0b1b3775
Commit
0b1b3775
authored
Sep 27, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Have -d5 -d0 not affect the extra variables set with -d5.
parent
1fe4cbb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+21
-18
No files found.
src/backend/tcop/postgres.c
View file @
0b1b3775
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.29
6 2002/09/27 03:34:15
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.29
7 2002/09/27 03:59:00
momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -1136,6 +1136,7 @@ PostgresMain(int argc, char *argv[], const char *username)
const
char
*
DBName
=
NULL
;
bool
secure
;
int
errs
=
0
;
int
debug_flag
=
0
;
GucContext
ctx
;
GucSource
gucsource
;
char
*
tmp
;
...
...
@@ -1250,6 +1251,7 @@ PostgresMain(int argc, char *argv[], const char *username)
case
'd'
:
/* debug level */
{
debug_flag
=
atoi
(
optarg
);
/* Set server debugging level. */
if
(
atoi
(
optarg
)
!=
0
)
{
...
...
@@ -1259,25 +1261,10 @@ PostgresMain(int argc, char *argv[], const char *username)
SetConfigOption
(
"server_min_messages"
,
debugstr
,
ctx
,
gucsource
);
pfree
(
debugstr
);
/*
* -d is not the same as setting
* client_min_messages because it enables other
* output options.
*/
if
(
atoi
(
optarg
)
>=
1
)
SetConfigOption
(
"log_connections"
,
"true"
,
ctx
,
gucsource
);
if
(
atoi
(
optarg
)
>=
2
)
SetConfigOption
(
"log_statement"
,
"true"
,
ctx
,
gucsource
);
if
(
atoi
(
optarg
)
>=
3
)
SetConfigOption
(
"debug_print_parse"
,
"true"
,
ctx
,
gucsource
);
if
(
atoi
(
optarg
)
>=
4
)
SetConfigOption
(
"debug_print_plan"
,
"true"
,
ctx
,
gucsource
);
if
(
atoi
(
optarg
)
>=
5
)
SetConfigOption
(
"debug_print_rewritten"
,
"true"
,
ctx
,
gucsource
);
}
else
/*
* -d
0 allows user to prevent postmaster debug
* -d0 allows user to prevent postmaster debug
* from propagating to backend. It would be nice
* to set it to the postgresql.conf value here.
*/
...
...
@@ -1520,6 +1507,22 @@ PostgresMain(int argc, char *argv[], const char *username)
break
;
}
/*
* -d is not the same as setting
* server_min_messages because it enables other
* output options.
*/
if
(
debug_flag
>=
1
)
SetConfigOption
(
"log_connections"
,
"true"
,
ctx
,
gucsource
);
if
(
debug_flag
>=
2
)
SetConfigOption
(
"log_statement"
,
"true"
,
ctx
,
gucsource
);
if
(
debug_flag
>=
3
)
SetConfigOption
(
"debug_print_parse"
,
"true"
,
ctx
,
gucsource
);
if
(
debug_flag
>=
4
)
SetConfigOption
(
"debug_print_plan"
,
"true"
,
ctx
,
gucsource
);
if
(
debug_flag
>=
5
)
SetConfigOption
(
"debug_print_rewritten"
,
"true"
,
ctx
,
gucsource
);
/*
* Post-processing for command line options.
*/
...
...
@@ -1698,7 +1701,7 @@ PostgresMain(int argc, char *argv[], const char *username)
if
(
!
IsUnderPostmaster
)
{
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.29
6 $ $Date: 2002/09/27 03:34:15
$
\n
"
);
puts
(
"$Revision: 1.29
7 $ $Date: 2002/09/27 03:59:00
$
\n
"
);
}
/*
...
...
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