2121 *
2222 *
2323 * IDENTIFICATION
24- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.137 2000/01/19 20:08:30 petere Exp $
24+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.138 2000/01/24 19:34:15 petere Exp $
2525 *
2626 * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2727 *
@@ -140,7 +140,7 @@ help(const char *progname)
140140" -h, --host <hostname> server host name\n"
141141" -n, --no-quotes suppress most quotes around identifiers\n"
142142" -N, --quotes enable most quotes around identifiers\n"
143- " -O , --oids dump object ids (oids)\n"
143+ " -o , --oids dump object ids (oids)\n"
144144" -p, --port <port> server port number\n"
145145" -s, --schema-only dump out only the schema, no data\n"
146146" -t, --table <table> dump for this table only\n"
@@ -157,7 +157,7 @@ help(const char *progname)
157157" -h <hostname> server host name\n"
158158" -n suppress most quotes around identifiers\n"
159159" -N enable most quotes around identifiers\n"
160- " -O dump object ids (oids)\n"
160+ " -o dump object ids (oids)\n"
161161" -p <port> server port number\n"
162162" -s dump out only the schema, no data\n"
163163" -t <table> dump for this table only\n"
@@ -557,11 +557,10 @@ main(int argc, char **argv)
557557{"clean" ,no_argument ,NULL ,'c' },
558558{"inserts" ,no_argument ,NULL ,'d' },
559559{"attribute-inserts" ,no_argument ,NULL ,'D' },
560- {"output" ,required_argument ,NULL ,'\037' },/* see note below */
561560{"host" ,required_argument ,NULL ,'h' },
562561{"no-quotes" ,no_argument ,NULL ,'n' },
563562{"quotes" ,no_argument ,NULL ,'N' },
564- {"oids" ,no_argument ,NULL ,'O ' },
563+ {"oids" ,no_argument ,NULL ,'o ' },
565564{"port" ,required_argument ,NULL ,'p' },
566565{"schema-only" ,no_argument ,NULL ,'s' },
567566{"table" ,required_argument ,NULL ,'t' },
@@ -592,25 +591,15 @@ main(int argc, char **argv)
592591/*
593592 * A note on options:
594593 *
595- * The standard option for specifying an output file is -o/--output.
596- * The standard option for specifying an input file is -f/--file.
597- * pg_dump used to use -f for specifying an output file.
598- * Unfortunately, -o is already in use for oids.
599- *
600- * Therefore I instituted the following:
601- * + The -f option is gone. Most people use > for output redirection anyway
602- * so there is really not a big point in supporting output files.
603- * + If you like, and can, you can use --output, but it's not documented.
604- * + The preferred option for oids is now -O. -o generates a warning.
605- * + In the (very far) future the -o option could be used to used for
606- * specifying an output file.
607- * -- petere 2000-01-17
594+ * The -f option was yanked because in the rest of the world (and
595+ * PostgreSQL) it specifies an *input* file. You can use the shell's
596+ * output redirection to achieve the same.
608597 */
609598
610599#ifdef HAVE_GETOPT_LONG
611- while ((c = getopt_long (argc ,argv ,"acdDf:h:nNoOp :st:uvxzV?\037 " ,long_options ,& optindex ))!= -1 )
600+ while ((c = getopt_long (argc ,argv ,"acdDf:h:nNop :st:uvxzV?" ,long_options ,& optindex ))!= -1 )
612601#else
613- while ((c = getopt (argc ,argv ,"acdDf:h:nNoOp :st:uvxzV?-" ))!= -1 )
602+ while ((c = getopt (argc ,argv ,"acdDf:h:nNop :st:uvxzV?-" ))!= -1 )
614603#endif
615604{
616605switch (c )
@@ -634,9 +623,6 @@ main(int argc, char **argv)
634623fprintf (stderr ,"%s: The -f option is obsolete. You can achieve the same by writing %s > %s.\n" ,
635624progname ,progname ,optarg );
636625exit (1 );
637- case '\037' :/* output file name, see note above */
638- filename = optarg ;
639- break ;
640626case 'h' :/* server host */
641627pghost = optarg ;
642628break ;
@@ -647,10 +633,7 @@ main(int argc, char **argv)
647633case 'N' :/* Force double-quotes on identifiers */
648634force_quotes = true;
649635break ;
650- case 'o' :
651- fprintf (stderr ,"%s: The -o option for dumping oids is deprecated. Please use -O.\n" ,progname );
652- /* FALLTHRU */
653- case 'O' :/* Dump oids */
636+ case 'o' :/* Dump oids */
654637oids = true;
655638break ;
656639case 'p' :/* server port */