8
8
*
9
9
*
10
10
* 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 $
12
12
*
13
13
* NOTES
14
14
* this is the "main" module of the postgres backend and
@@ -129,7 +129,7 @@ extern int NBuffers;
129
129
static bool EchoQuery = false; /* default don't echo */
130
130
time_t tim ;
131
131
char pg_pathname [MAXPGPATH ];
132
- FILE * StatFp ;
132
+ FILE * StatFp = NULL ;
133
133
134
134
/* ----------------
135
135
* 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[])
1105
1105
* ----------------
1106
1106
*/
1107
1107
ShowStats = 1 ;
1108
- StatFp = stderr ;
1109
1108
break ;
1110
1109
1111
1110
case 'T' :
@@ -1127,7 +1126,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
1127
1126
* caution: -s can not be used together with -t.
1128
1127
* ----------------
1129
1128
*/
1130
- StatFp = stderr ;
1131
1129
switch (optarg [0 ])
1132
1130
{
1133
1131
case 'p' :
@@ -1455,7 +1453,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
1455
1453
if (!IsUnderPostmaster )
1456
1454
{
1457
1455
puts ("\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" );
1459
1457
}
1460
1458
1461
1459
/*
@@ -1694,6 +1692,12 @@ ShowUsage(void)
1694
1692
r .ru_stime .tv_usec += 1000000 ;
1695
1693
}
1696
1694
1695
+ /*
1696
+ * Set output destination if not otherwise set
1697
+ */
1698
+ if (StatFp == NULL )
1699
+ StatFp = stderr ;
1700
+
1697
1701
/*
1698
1702
* the only stats we don't show here are for memory usage -- i can't
1699
1703
* figure out how to interpret the relevant fields in the rusage
0 commit comments