mirror of
https://github.com/postgres/postgres.git
synced 2025-07-21 16:02:15 +03:00
Reduce printing from debug level 2 ande layout change.
This commit is contained in:
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* NOTES
|
||||||
* this is the "main" module of the postgres backend and
|
* this is the "main" module of the postgres backend and
|
||||||
@ -83,6 +83,7 @@
|
|||||||
* global variables
|
* global variables
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
|
static bool DebugPrintQuery = false;
|
||||||
static bool DebugPrintPlan = false;
|
static bool DebugPrintPlan = false;
|
||||||
static bool DebugPrintParse = false;
|
static bool DebugPrintParse = false;
|
||||||
static bool DebugPrintRewrittenParsetree = false;
|
static bool DebugPrintRewrittenParsetree = false;
|
||||||
@ -406,8 +407,13 @@ pg_plan(char *query_string, /* string to execute */
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( DebugPrintQuery == true ) {
|
||||||
|
printf("\n---- \tquery is:\n%s\n",query_string);
|
||||||
|
printf("\n");
|
||||||
|
fflush(stdout);
|
||||||
|
}
|
||||||
|
|
||||||
if ( DebugPrintParse == true ) {
|
if ( DebugPrintParse == true ) {
|
||||||
printf("\ninput string is \"%s\"\n",query_string);
|
|
||||||
printf("\n---- \tparser outputs :\n");
|
printf("\n---- \tparser outputs :\n");
|
||||||
nodeDisplay(querytree);
|
nodeDisplay(querytree);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
@ -483,9 +489,7 @@ pg_plan(char *query_string, /* string to execute */
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (DebugPrintRewrittenParsetree == true) {
|
if (DebugPrintRewrittenParsetree == true) {
|
||||||
printf("\n=================\n");
|
printf("\n---- \tafter rewriting:\n");
|
||||||
printf(" After Rewriting\n");
|
|
||||||
printf("=================\n");
|
|
||||||
|
|
||||||
for (i=0; i<querytree_list->len; i++) {
|
for (i=0; i<querytree_list->len; i++) {
|
||||||
print(querytree_list->qtrees[i]);
|
print(querytree_list->qtrees[i]);
|
||||||
@ -534,7 +538,7 @@ pg_plan(char *query_string, /* string to execute */
|
|||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
if ( DebugPrintPlan == true ) {
|
if ( DebugPrintPlan == true ) {
|
||||||
printf("\nPlan is :\n");
|
printf("\n---- \tplan is :\n");
|
||||||
nodeDisplay(plan);
|
nodeDisplay(plan);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
@ -646,7 +650,7 @@ pg_eval_dest(char *query_string, /* string to execute */
|
|||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
if ( DebugPrintPlan == true ) {
|
if ( DebugPrintPlan == true ) {
|
||||||
printf("\nPlan is :\n");
|
printf("\n---- plan is :\n");
|
||||||
nodeDisplay(plan);
|
nodeDisplay(plan);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
@ -884,10 +888,15 @@ PostgresMain(int argc, char *argv[])
|
|||||||
|
|
||||||
case 'd': /* debug level */
|
case 'd': /* debug level */
|
||||||
flagQ = 0;
|
flagQ = 0;
|
||||||
DebugPrintPlan = true;
|
|
||||||
DebugPrintParse = true;
|
|
||||||
DebugPrintRewrittenParsetree = true;
|
|
||||||
DebugLvl = (short)atoi(optarg);
|
DebugLvl = (short)atoi(optarg);
|
||||||
|
if (DebugLvl > 1)
|
||||||
|
DebugPrintQuery = true;
|
||||||
|
if (DebugLvl > 2)
|
||||||
|
{
|
||||||
|
DebugPrintParse = true;
|
||||||
|
DebugPrintPlan = true;
|
||||||
|
DebugPrintRewrittenParsetree = true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'E':
|
case 'E':
|
||||||
@ -1262,7 +1271,7 @@ PostgresMain(int argc, char *argv[])
|
|||||||
*/
|
*/
|
||||||
if (IsUnderPostmaster == false) {
|
if (IsUnderPostmaster == false) {
|
||||||
puts("\nPOSTGRES backend interactive interface");
|
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 $");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.\" This is -*-nroff-*-
|
.\" This is -*-nroff-*-
|
||||||
.\" XXX standard disclaimer belongs here....
|
.\" 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
|
.TH POSTGRES95 UNIX 11/05/95 Postgres95 Postgres95
|
||||||
.SH NAME
|
.SH NAME
|
||||||
postgres \(em the Postgres backend server
|
postgres \(em the Postgres backend server
|
||||||
@ -84,7 +84,7 @@ Specifies \*(lqquiet\*(rq mode.
|
|||||||
.BR "-d" " debug_level"
|
.BR "-d" " debug_level"
|
||||||
Turns on debugging at the numeric level
|
Turns on debugging at the numeric level
|
||||||
.IR "debug_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.
|
be displayed.
|
||||||
.TP
|
.TP
|
||||||
.BR "-o" " output_file"
|
.BR "-o" " output_file"
|
||||||
|
Reference in New Issue
Block a user