88 *
99 *
1010 * IDENTIFICATION
11- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.152 2000/04/23 00:13:16 tgl Exp $
11+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.153 2000/04/28 05:07:34 tgl Exp $
1212 *
1313 * NOTES
1414 * this is the "main" module of the postgres backend and
@@ -129,7 +129,7 @@ extern intNBuffers;
129129static bool EchoQuery = false;/* default don't echo */
130130time_t tim ;
131131char pg_pathname [MAXPGPATH ];
132- FILE * StatFp ;
132+ FILE * StatFp = NULL ;
133133
134134/* ----------------
135135 *people who want to use EOF should #define DONTUSENEWLINE in
@@ -1105,7 +1105,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
11051105 * ----------------
11061106 */
11071107ShowStats = 1 ;
1108- StatFp = stderr ;
11091108break ;
11101109
11111110case 'T' :
@@ -1127,7 +1126,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
11271126 *caution: -s can not be used together with -t.
11281127 * ----------------
11291128 */
1130- StatFp = stderr ;
11311129switch (optarg [0 ])
11321130{
11331131case 'p' :
@@ -1455,7 +1453,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
14551453if (!IsUnderPostmaster )
14561454{
14571455puts ("\nPOSTGRES backend interactive interface " );
1458- puts ("$Revision: 1.152 $ $Date: 2000/04/23 00:13:16 $\n" );
1456+ puts ("$Revision: 1.153 $ $Date: 2000/04/28 05:07:34 $\n" );
14591457}
14601458
14611459/*
@@ -1694,6 +1692,12 @@ ShowUsage(void)
16941692r .ru_stime .tv_usec += 1000000 ;
16951693}
16961694
1695+ /*
1696+ * Set output destination if not otherwise set
1697+ */
1698+ if (StatFp == NULL )
1699+ StatFp = stderr ;
1700+
16971701/*
16981702 * the only stats we don't show here are for memory usage -- i can't
16991703 * figure out how to interpret the relevant fields in the rusage