*
*
* 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
* global variables
* ----------------
*/
+static bool DebugPrintQuery = false;
static bool DebugPrintPlan = false;
static bool DebugPrintParse = false;
static bool DebugPrintRewrittenParsetree = false;
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");
}
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]);
* ----------------
*/
if ( DebugPrintPlan == true ) {
- printf("\nPlan is :\n");
+ printf("\n---- \tplan is :\n");
nodeDisplay(plan);
printf("\n");
}
* ----------------
*/
if ( DebugPrintPlan == true ) {
- printf("\nPlan is :\n");
+ printf("\n---- plan is :\n");
nodeDisplay(plan);
printf("\n");
}
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':
*/
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 $");
}
/* ----------------
.\" 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
.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"