Skip to content

Commit 457d6cf

Browse files
committed
pg_upgrade: change -u to -U, for consistency
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
1 parent 5893ffa commit 457d6cf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

contrib/pg_upgrade/option.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ parseCommandLine(int argc, char *argv[])
4848
{"old-port", required_argument, NULL, 'p'},
4949
{"new-port", required_argument, NULL, 'P'},
5050

51-
{"user", required_argument, NULL, 'u'},
51+
{"username", required_argument, NULL, 'U'},
5252
{"check", no_argument, NULL, 'c'},
5353
{"link", no_argument, NULL, 'k'},
5454
{"retain", no_argument, NULL, 'r'},
@@ -102,7 +102,7 @@ parseCommandLine(int argc, char *argv[])
102102
if ((log_opts.internal = fopen_priv(INTERNAL_LOG_FILE, "a")) == NULL)
103103
pg_log(PG_FATAL, "cannot write to log file %s\n", INTERNAL_LOG_FILE);
104104

105-
while ((option = getopt_long(argc, argv, "d:D:b:B:cj:ko:O:p:P:ru:v",
105+
while ((option = getopt_long(argc, argv, "d:D:b:B:cj:ko:O:p:P:rU:v",
106106
long_options, &optindex)) != -1)
107107
{
108108
switch (option)
@@ -170,7 +170,7 @@ parseCommandLine(int argc, char *argv[])
170170
log_opts.retain = true;
171171
break;
172172

173-
case 'u':
173+
case 'U':
174174
pg_free(os_info.user);
175175
os_info.user = pg_strdup(optarg);
176176

@@ -241,7 +241,7 @@ Options:\n\
241241
-p, --old-port=OLDPORT old cluster port number (default %d)\n\
242242
-P, --new-port=NEWPORT new cluster port number (default %d)\n\
243243
-r, --retain retain SQL and log files after success\n\
244-
-u, --user=NAME cluster superuser (default \"%s\")\n\
244+
-U, --username=NAME cluster superuser (default \"%s\")\n\
245245
-v, --verbose enable verbose internal logging\n\
246246
-V, --version display version information, then exit\n\
247247
-?, -h, --help show this help, then exit\n\

doc/src/sgml/pgupgrade.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@
161161
</varlistentry>
162162

163163
<varlistentry>
164-
<term><option>-u</option> <replaceable>user_name</></term>
165-
<term><option>--user=</option><replaceable>user_name</></term>
164+
<term><option>-U</option> <replaceable>user_name</></term>
165+
<term><option>--username=</option><replaceable>user_name</></term>
166166
<listitem><para>cluster's super user name; environment
167167
variable <envar>PGUSER</></para></listitem>
168168
</varlistentry>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy