aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1996-12-07 04:39:38 +0000
committerBruce Momjian <bruce@momjian.us>1996-12-07 04:39:38 +0000
commit8cedf57eb152440ff06d75066799e6e249d1d336 (patch)
treecd6136772e860a0cb71a1d051a7f1c6c0239e03f /src
parent2e20099e328dcaff068841e8637e268fb6d17beb (diff)
downloadpostgresql-8cedf57eb152440ff06d75066799e6e249d1d336.tar.gz
postgresql-8cedf57eb152440ff06d75066799e6e249d1d336.zip
Reduce printing from debug level 2 ande layout change.
Diffstat (limited to 'src')
-rw-r--r--src/backend/tcop/postgres.c31
-rw-r--r--src/man/postgres.14
2 files changed, 22 insertions, 13 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 9faa69e4029..be3aeb96f37 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.22 1996/11/27 13:47:05 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.23 1996/12/07 04:39:06 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -83,6 +83,7 @@
* global variables
* ----------------
*/
+static bool DebugPrintQuery = false;
static bool DebugPrintPlan = false;
static bool DebugPrintParse = false;
static bool DebugPrintRewrittenParsetree = false;
@@ -406,8 +407,13 @@ pg_plan(char *query_string, /* string to execute */
continue;
}
+ if ( DebugPrintQuery == true ) {
+ printf("\n---- \tquery is:\n%s\n",query_string);
+ printf("\n");
+ fflush(stdout);
+ }
+
if ( DebugPrintParse == true ) {
- printf("\ninput string is \"%s\"\n",query_string);
printf("\n---- \tparser outputs :\n");
nodeDisplay(querytree);
printf("\n");
@@ -483,9 +489,7 @@ pg_plan(char *query_string, /* string to execute */
}
if (DebugPrintRewrittenParsetree == true) {
- printf("\n=================\n");
- printf(" After Rewriting\n");
- printf("=================\n");
+ printf("\n---- \tafter rewriting:\n");
for (i=0; i<querytree_list->len; i++) {
print(querytree_list->qtrees[i]);
@@ -534,7 +538,7 @@ pg_plan(char *query_string, /* string to execute */
* ----------------
*/
if ( DebugPrintPlan == true ) {
- printf("\nPlan is :\n");
+ printf("\n---- \tplan is :\n");
nodeDisplay(plan);
printf("\n");
}
@@ -646,7 +650,7 @@ pg_eval_dest(char *query_string, /* string to execute */
* ----------------
*/
if ( DebugPrintPlan == true ) {
- printf("\nPlan is :\n");
+ printf("\n---- plan is :\n");
nodeDisplay(plan);
printf("\n");
}
@@ -884,10 +888,15 @@ PostgresMain(int argc, char *argv[])
case 'd': /* debug level */
flagQ = 0;
- DebugPrintPlan = true;
- DebugPrintParse = true;
- DebugPrintRewrittenParsetree = true;
DebugLvl = (short)atoi(optarg);
+ if (DebugLvl > 1)
+ DebugPrintQuery = true;
+ if (DebugLvl > 2)
+ {
+ DebugPrintParse = true;
+ DebugPrintPlan = true;
+ DebugPrintRewrittenParsetree = true;
+ }
break;
case 'E':
@@ -1262,7 +1271,7 @@ PostgresMain(int argc, char *argv[])
*/
if (IsUnderPostmaster == false) {
puts("\nPOSTGRES backend interactive interface");
- puts("$Revision: 1.22 $ $Date: 1996/11/27 13:47:05 $");
+ puts("$Revision: 1.23 $ $Date: 1996/12/07 04:39:06 $");
}
/* ----------------
diff --git a/src/man/postgres.1 b/src/man/postgres.1
index 331333a5cb5..6f1a935dd88 100644
--- a/src/man/postgres.1
+++ b/src/man/postgres.1
@@ -1,6 +1,6 @@
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
-.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.1 1996/11/14 10:17:46 scrappy Exp $
+.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.2 1996/12/07 04:39:38 momjian Exp $
.TH POSTGRES95 UNIX 11/05/95 Postgres95 Postgres95
.SH NAME
postgres \(em the Postgres backend server
@@ -84,7 +84,7 @@ Specifies \*(lqquiet\*(rq mode.
.BR "-d" " debug_level"
Turns on debugging at the numeric level
.IR "debug_level" .
-Turning on debugging will cause query parse trees and query plans to
+Turning on debugging will cause query, parse trees, and query plans to
be displayed.
.TP
.BR "-o" " output_file"