77 *
88 *
99 * IDENTIFICATION
10- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.108 1999/04/25 03:19:10 tgl Exp $
10+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.109 1999/05/01 17:16:25 tgl Exp $
1111 *
1212 * NOTES
1313 * this is the "main" module of the postgres backend and
@@ -907,26 +907,28 @@ usage(char *progname)
907907fprintf (stderr ,
908908"Usage: %s [options] [dbname]\n" ,progname );
909909#ifdef USE_ASSERT_CHECKING
910- fprintf (stderr ,"\t-Aenable /disable assert checking\n" );
910+ fprintf (stderr ,"\t-Aon\t\tenable /disable assert checking\n" );
911911#endif
912912fprintf (stderr ,"\t-B buffers\tset number of buffers in buffer pool\n" );
913- fprintf (stderr ,"\t-C \t\tsupress version info\n" );
913+ fprintf (stderr ,"\t-C \t\tsuppress version info\n" );
914914fprintf (stderr ,"\t-D dir\t\tdata directory\n" );
915915fprintf (stderr ,"\t-E \t\techo query before execution\n" );
916916fprintf (stderr ,"\t-F \t\tturn off fsync\n" );
917917#ifdef LOCK_MGR_DEBUG
918- fprintf (stderr ,"\t-K \t\tset locking debug level [0|1|2]\n" );
918+ fprintf (stderr ,"\t-Klev \t\tset locking debug level [0|1|2]\n" );
919919#endif
920920fprintf (stderr ,"\t-O \t\tallow system table structure changes\n" );
921921fprintf (stderr ,"\t-P port\t\tset port file descriptor\n" );
922922fprintf (stderr ,"\t-Q \t\tsuppress informational messages\n" );
923923fprintf (stderr ,"\t-S buffers\tset amount of sort memory available\n" );
924+ fprintf (stderr ,"\t-T options\tspecify pg_options\n" );
925+ fprintf (stderr ,"\t-W sec\t\twait N seconds to allow attach from a debugger\n" );
924926fprintf (stderr ,"\t-d [1|2|3]\tset debug level\n" );
925927fprintf (stderr ,"\t-e \t\tturn on European date format\n" );
928+ fprintf (stderr ,"\t-f [s|i|n|m|h]\tforbid use of some plan types\n" );
926929fprintf (stderr ,"\t-o file\t\tsend stdout and stderr to given filename \n" );
927930fprintf (stderr ,"\t-s \t\tshow stats after each query\n" );
928931fprintf (stderr ,"\t-v version\tset protocol version being used by frontend\n" );
929- fprintf (stderr ,"\t-W \t\twait N seconds to allow attach from a debugger\n" );
930932}
931933
932934/* ----------------------------------------------------------------
@@ -1018,7 +1020,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
10181020optind = 1 ;/* reset after postmaster usage */
10191021
10201022while ((flag = getopt (argc ,argv ,
1021- "A:B:CD:d:Eef :iK:Lm:MNOo :P:pQS:st:v:x:FW :" ))
1023+ "A:B:CD:d:EeFf :iK:LMm:NOo :P:pQS:sT:t:v:W:x :" ))
10221024!= EOF )
10231025switch (flag )
10241026{
@@ -1051,7 +1053,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
10511053break ;
10521054
10531055case 'D' :/* PGDATA directory */
1054- if (!DataDir ) {
1056+ if (!DataDir ) {
10551057DataDir = optarg ;
10561058/* must be done after DataDir is defined */
10571059read_pg_options (0 );
@@ -1147,12 +1149,14 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
11471149lockingOff = 1 ;
11481150break ;
11491151
1150- case 'm' :
1151- /* Multiplexed backends are no longer supported. */
1152- break ;
11531152case 'M' :
11541153exit (PostmasterMain (argc ,argv ));
11551154break ;
1155+
1156+ case 'm' :
1157+ /* Multiplexed backends are no longer supported. */
1158+ break ;
1159+
11561160case 'N' :
11571161/* ----------------
11581162 *N - Don't use newline as a query delimiter
@@ -1161,14 +1165,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
11611165UseNewLine = 0 ;
11621166break ;
11631167
1164- case 'o' :
1165- /* ----------------
1166- *o - send output (stdout and stderr) to the given file
1167- * ----------------
1168- */
1169- StrNCpy (OutputFileName ,optarg ,MAXPGPATH );
1170- break ;
1171-
11721168case 'O' :
11731169/* --------------------
11741170 *allow system table structure modifications
@@ -1177,6 +1173,14 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
11771173allowSystemTableMods = true;
11781174break ;
11791175
1176+ case 'o' :
1177+ /* ----------------
1178+ *o - send output (stdout and stderr) to the given file
1179+ * ----------------
1180+ */
1181+ StrNCpy (OutputFileName ,optarg ,MAXPGPATH );
1182+ break ;
1183+
11801184case 'p' :/* started by postmaster */
11811185/* ----------------
11821186 *p - special flag passed if backend was forked
@@ -1314,6 +1318,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
13141318 * ----------------
13151319 */
13161320errs ++ ;
1321+ break ;
13171322}
13181323
13191324/* ----------------
@@ -1534,7 +1539,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
15341539if (!IsUnderPostmaster )
15351540{
15361541puts ("\nPOSTGRES backend interactive interface " );
1537- puts ("$Revision: 1.108 $ $Date: 1999/04/25 03:19:10 $\n" );
1542+ puts ("$Revision: 1.109 $ $Date: 1999/05/01 17:16:25 $\n" );
15381543}
15391544
15401545/* ----------------