]> granicus.if.org Git - postgresql/commitdiff
Our version of getopt_long does not set optarg upon detecting an error, as
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Sun, 25 Jun 2006 04:38:00 +0000 (04:38 +0000)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Sun, 25 Jun 2006 04:38:00 +0000 (04:38 +0000)
opposed to what other versions apparently do, so it's not safe to print an
error message.  Besides, getopt_long itself already did, so it's redundant
anyway.

src/bin/pg_ctl/pg_ctl.c

index 7e5c3f59065342da9c6c81cfcf89e6eb9de5fdb0..fc5061e044ad017ad6fc6615b4942ba41af1c21c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.61.2.2 2006/01/14 16:16:08 petere Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.61.2.3 2006/06/25 04:38:00 alvherre Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1418,7 +1418,7 @@ main(int argc, char **argv)
                                        wait_set = true;
                                        break;
                                default:
-                                       write_stderr(_("%s: invalid option %s\n"), progname, optarg);
+                                       /* getopt_long already issued a suitable error message */
                                        do_advice();
                                        exit(1);
                        }