]> granicus.if.org Git - postgresql/commitdiff
pg_upgrade: change -u to -U, for consistency
authorBruce Momjian <bruce@momjian.us>
Fri, 28 Jun 2013 21:27:02 +0000 (17:27 -0400)
committerBruce Momjian <bruce@momjian.us>
Fri, 28 Jun 2013 21:27:43 +0000 (17:27 -0400)
Change -u (user) option to -U, for consistency with other tools like
pg_dump and psql.  Also expand --user to --username, again for
consistency.
BACKWARD INCOMPATIBILITY

contrib/pg_upgrade/option.c
doc/src/sgml/pgupgrade.sgml

index 1459ca9096694705abb7df71f3351e5f508b023f..a586b4e57a7d2313d0713c7104e3ca5380e382f0 100644 (file)
@@ -48,7 +48,7 @@ parseCommandLine(int argc, char *argv[])
                {"old-port", required_argument, NULL, 'p'},
                {"new-port", required_argument, NULL, 'P'},
 
-               {"user", required_argument, NULL, 'u'},
+               {"username", required_argument, NULL, 'U'},
                {"check", no_argument, NULL, 'c'},
                {"link", no_argument, NULL, 'k'},
                {"retain", no_argument, NULL, 'r'},
@@ -102,7 +102,7 @@ parseCommandLine(int argc, char *argv[])
        if ((log_opts.internal = fopen_priv(INTERNAL_LOG_FILE, "a")) == NULL)
                pg_log(PG_FATAL, "cannot write to log file %s\n", INTERNAL_LOG_FILE);
 
-       while ((option = getopt_long(argc, argv, "d:D:b:B:cj:ko:O:p:P:ru:v",
+       while ((option = getopt_long(argc, argv, "d:D:b:B:cj:ko:O:p:P:rU:v",
                                                                 long_options, &optindex)) != -1)
        {
                switch (option)
@@ -170,7 +170,7 @@ parseCommandLine(int argc, char *argv[])
                                log_opts.retain = true;
                                break;
 
-                       case 'u':
+                       case 'U':
                                pg_free(os_info.user);
                                os_info.user = pg_strdup(optarg);
 
@@ -241,7 +241,7 @@ Options:\n\
   -p, --old-port=OLDPORT        old cluster port number (default %d)\n\
   -P, --new-port=NEWPORT        new cluster port number (default %d)\n\
   -r, --retain                  retain SQL and log files after success\n\
-  -u, --user=NAME               cluster superuser (default \"%s\")\n\
+  -U, --username=NAME           cluster superuser (default \"%s\")\n\
   -v, --verbose                 enable verbose internal logging\n\
   -V, --version                 display version information, then exit\n\
   -?, -h, --help                show this help, then exit\n\
index 62856f1df81dd34e7fb55e6c07facfcaf28ccb7f..a89656564198419d8b0937d2cbe99771ca79c4d6 100644 (file)
      </varlistentry>
 
      <varlistentry>
-      <term><option>-u</option> <replaceable>user_name</></term>
-      <term><option>--user=</option><replaceable>user_name</></term>
+      <term><option>-U</option> <replaceable>user_name</></term>
+      <term><option>--username=</option><replaceable>user_name</></term>
       <listitem><para>cluster's super user name; environment
       variable <envar>PGUSER</></para></listitem>
      </varlistentry>