88 *
99 *
1010 * IDENTIFICATION
11- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.225 2001/06/23 22:23:49 momjian Exp $
11+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.226 2001/06/25 22:56:04 tgl Exp $
1212 *
1313 * NOTES
1414 * this is the "main" module of the postgres backend and
@@ -1108,7 +1108,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
11081108int flag ;
11091109
11101110const char * DBName = NULL ;
1111- bool secure = true ;
1111+ bool secure ;
11121112int errs = 0 ;
11131113GucContext ctx ;
11141114char * tmp ;
@@ -1120,9 +1120,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
11201120unsigned short remote_port ;
11211121
11221122char * potential_DataDir = NULL ;
1123-
1124- /* all options are allowed until '-p' */
1125- ctx = PGC_POSTMASTER ;
11261123
11271124/*
11281125 * Catch standard options before doing much else. This even works on
@@ -1190,6 +1187,10 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
11901187 * ----------------
11911188 */
11921189
1190+ /* all options are allowed until '-p' */
1191+ secure = true;
1192+ ctx = PGC_POSTMASTER ;
1193+
11931194optind = 1 ;/* reset after postmaster's usage */
11941195
11951196while ((flag = getopt (argc ,argv ,"A:B:c:CD:d:Eef:FiLNOPo:p:S:st:v:W:x:-:" ))!= EOF )
@@ -1225,18 +1226,17 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
12251226break ;
12261227
12271228case 'd' :/* debug level */
1228- tmp = "true" ;
12291229SetConfigOption ("debug_level" ,optarg ,ctx , true);
12301230if (DebugLvl >=1 )
1231- SetConfigOption ("log_connections" ,tmp ,ctx , true);
1231+ SetConfigOption ("log_connections" ,"true" ,ctx , true);
12321232if (DebugLvl >=2 )
1233- SetConfigOption ("debug_print_query" ,tmp ,ctx , true);
1233+ SetConfigOption ("debug_print_query" ,"true" ,ctx , true);
12341234if (DebugLvl >=3 )
1235- SetConfigOption ("debug_print_parse" ,tmp ,ctx , true);
1235+ SetConfigOption ("debug_print_parse" ,"true" ,ctx , true);
12361236if (DebugLvl >=4 )
1237- SetConfigOption ("debug_print_plan" ,tmp ,ctx , true);
1237+ SetConfigOption ("debug_print_plan" ,"true" ,ctx , true);
12381238if (DebugLvl >=5 )
1239- SetConfigOption ("debug_print_rewritten" ,tmp ,ctx , true);
1239+ SetConfigOption ("debug_print_rewritten" ,"true" ,ctx , true);
12401240break ;
12411241
12421242case 'E' :
@@ -1491,7 +1491,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
14911491(Show_parser_stats || Show_planner_stats || Show_executor_stats ))
14921492{
14931493fprintf (stderr ,"Query statistics are disabled because parser, planner, or executor statistics are on.\n" );
1494- Show_query_stats = false;
1494+ SetConfigOption ( "show_query_stats" , " false" , ctx , true) ;
14951495}
14961496
14971497if (!IsUnderPostmaster )
@@ -1714,7 +1714,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
17141714if (!IsUnderPostmaster )
17151715{
17161716puts ("\nPOSTGRES backend interactive interface " );
1717- puts ("$Revision: 1.225 $ $Date: 2001/06/23 22:23:49 $\n" );
1717+ puts ("$Revision: 1.226 $ $Date: 2001/06/25 22:56:04 $\n" );
17181718}
17191719
17201720/*