Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8cedf57

Browse files
committed
Reduce printing from debug level 2 ande layout change.
1 parent2e20099 commit8cedf57

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.22 1996/11/27 13:47:05 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.23 1996/12/07 04:39:06 momjian Exp $
1111
*
1212
* NOTES
1313
* this is the "main" module of the postgres backend and
@@ -83,6 +83,7 @@
8383
* global variables
8484
* ----------------
8585
*/
86+
staticboolDebugPrintQuery= false;
8687
staticboolDebugPrintPlan= false;
8788
staticboolDebugPrintParse= false;
8889
staticboolDebugPrintRewrittenParsetree= false;
@@ -406,8 +407,13 @@ pg_plan(char *query_string, /* string to execute */
406407
continue;
407408
}
408409

410+
if (DebugPrintQuery== true ) {
411+
printf("\n---- \tquery is:\n%s\n",query_string);
412+
printf("\n");
413+
fflush(stdout);
414+
}
415+
409416
if (DebugPrintParse== true ) {
410-
printf("\ninput string is \"%s\"\n",query_string);
411417
printf("\n---- \tparser outputs :\n");
412418
nodeDisplay(querytree);
413419
printf("\n");
@@ -483,9 +489,7 @@ pg_plan(char *query_string, /* string to execute */
483489
}
484490

485491
if (DebugPrintRewrittenParsetree== true) {
486-
printf("\n=================\n");
487-
printf(" After Rewriting\n");
488-
printf("=================\n");
492+
printf("\n---- \tafter rewriting:\n");
489493

490494
for (i=0;i<querytree_list->len;i++) {
491495
print(querytree_list->qtrees[i]);
@@ -534,7 +538,7 @@ pg_plan(char *query_string, /* string to execute */
534538
* ----------------
535539
*/
536540
if (DebugPrintPlan== true ) {
537-
printf("\nPlan is :\n");
541+
printf("\n---- \tplan is :\n");
538542
nodeDisplay(plan);
539543
printf("\n");
540544
}
@@ -646,7 +650,7 @@ pg_eval_dest(char *query_string, /* string to execute */
646650
* ----------------
647651
*/
648652
if (DebugPrintPlan== true ) {
649-
printf("\nPlan is :\n");
653+
printf("\n---- plan is :\n");
650654
nodeDisplay(plan);
651655
printf("\n");
652656
}
@@ -884,10 +888,15 @@ PostgresMain(int argc, char *argv[])
884888

885889
case'd':/* debug level */
886890
flagQ=0;
887-
DebugPrintPlan= true;
888-
DebugPrintParse= true;
889-
DebugPrintRewrittenParsetree= true;
890891
DebugLvl= (short)atoi(optarg);
892+
if (DebugLvl>1)
893+
DebugPrintQuery= true;
894+
if (DebugLvl>2)
895+
{
896+
DebugPrintParse= true;
897+
DebugPrintPlan= true;
898+
DebugPrintRewrittenParsetree= true;
899+
}
891900
break;
892901

893902
case'E':
@@ -1262,7 +1271,7 @@ PostgresMain(int argc, char *argv[])
12621271
*/
12631272
if (IsUnderPostmaster== false) {
12641273
puts("\nPOSTGRES backend interactive interface");
1265-
puts("$Revision: 1.22 $ $Date: 1996/11/27 13:47:05 $");
1274+
puts("$Revision: 1.23 $ $Date: 1996/12/07 04:39:06 $");
12661275
}
12671276

12681277
/* ----------------

‎src/man/postgres.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" This is -*-nroff-*-
22
.\" XXX standard disclaimer belongs here....
3-
.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.1 1996/11/14 10:17:46 scrappy Exp $
3+
.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.2 1996/12/07 04:39:38 momjian Exp $
44
.TH POSTGRES95 UNIX 11/05/95 Postgres95 Postgres95
55
.SH NAME
66
postgres\(em the Postgres backend server
@@ -84,7 +84,7 @@ Specifies \*(lqquiet\*(rq mode.
8484
.BR"-d"" debug_level"
8585
Turns on debugging at the numeric level
8686
.IR"debug_level".
87-
Turning on debugging will cause query parse trees and query plans to
87+
Turning on debugging will cause query, parse trees, and query plans to
8888
be displayed.
8989
.TP
9090
.BR"-o"" output_file"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp