diff options
author | Nathan Bossart <nathan@postgresql.org> | 2023-05-21 20:03:56 -0700 |
---|---|---|
committer | Nathan Bossart <nathan@postgresql.org> | 2023-05-21 20:06:38 -0700 |
commit | 2dcd1578c40153250836df62f625863056c28a81 (patch) | |
tree | f2a3818b3ec20ee30f0e6f504db6a2130bdd1a46 /src/bin/scripts/createuser.c | |
parent | de7c3fd34e0fc0a3f77537e1d12efcd01d255534 (diff) |
Rename some createuser options.
This change renames --admin to --with-admin, --role to --member-of,
and --member to --with-member. Many people found the previous
names to be confusing. The --admin and --member options are new in
v16, but --role has been there for a while, so that one has been
kept (but left undocumented) for backward compatibility.
Suggested-by: Peter Eisentraut
Reviewed-by: Tom Lane, Michael Paquier
Discussion: https://postgr.es/m/ZFvVZvQDliIWmOwg%40momjian.us
Diffstat (limited to 'src/bin/scripts/createuser.c')
-rw-r--r-- | src/bin/scripts/createuser.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c index 0c7f454be50..2d5e2452f78 100644 --- a/src/bin/scripts/createuser.c +++ b/src/bin/scripts/createuser.c @@ -28,19 +28,21 @@ int main(int argc, char *argv[]) { static struct option long_options[] = { - {"admin", required_argument, NULL, 'a'}, + {"with-admin", required_argument, NULL, 'a'}, {"connection-limit", required_argument, NULL, 'c'}, {"createdb", no_argument, NULL, 'd'}, {"no-createdb", no_argument, NULL, 'D'}, {"echo", no_argument, NULL, 'e'}, {"encrypted", no_argument, NULL, 'E'}, - {"role", required_argument, NULL, 'g'}, + {"role", required_argument, NULL, 'g'}, /* kept for backward + * compatibility */ + {"member-of", required_argument, NULL, 'g'}, {"host", required_argument, NULL, 'h'}, {"inherit", no_argument, NULL, 'i'}, {"no-inherit", no_argument, NULL, 'I'}, {"login", no_argument, NULL, 'l'}, {"no-login", no_argument, NULL, 'L'}, - {"member", required_argument, NULL, 'm'}, + {"with-member", required_argument, NULL, 'm'}, {"port", required_argument, NULL, 'p'}, {"pwprompt", no_argument, NULL, 'P'}, {"createrole", no_argument, NULL, 'r'}, @@ -414,19 +416,19 @@ help(const char *progname) printf(_("Usage:\n")); printf(_(" %s [OPTION]... [ROLENAME]\n"), progname); printf(_("\nOptions:\n")); - printf(_(" -a, --admin=ROLE this role will be a member of new role with admin\n" + printf(_(" -a, --with-admin=ROLE ROLE will be a member of new role with admin\n" " option\n")); printf(_(" -c, --connection-limit=N connection limit for role (default: no limit)\n")); printf(_(" -d, --createdb role can create new databases\n")); printf(_(" -D, --no-createdb role cannot create databases (default)\n")); printf(_(" -e, --echo show the commands being sent to the server\n")); - printf(_(" -g, --role=ROLE new role will be a member of this role\n")); + printf(_(" -g, --member-of=ROLE new role will be a member of ROLE\n")); printf(_(" -i, --inherit role inherits privileges of roles it is a\n" " member of (default)\n")); printf(_(" -I, --no-inherit role does not inherit privileges\n")); printf(_(" -l, --login role can login (default)\n")); printf(_(" -L, --no-login role cannot login\n")); - printf(_(" -m, --member=ROLE this role will be a member of new role\n")); + printf(_(" -m, --with-member=ROLE ROLE will be a member of new role\n")); printf(_(" -P, --pwprompt assign a password to new role\n")); printf(_(" -r, --createrole role can create new roles\n")); printf(_(" -R, --no-createrole role cannot create roles (default)\n")); |