Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit381d19b

Browse files
Document deprecated createuser option.
2dcd157 left the --role option undocumented, which isinconsistent with other deprecated options such as pg_dump's--blobs and --no-blobs. This change adds --role back tocreateuser's documentation and usage output and marks it asdeprecated.Suggested-by: Peter EisentrautReviewed-by: Michael PaquierDiscussion:https://postgr.es/m/0e85c9e7-4804-1cdb-5a4a-c72c328f9ad8%40enterprisedb.com
1 parentbe3f62a commit381d19b

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

‎doc/src/sgml/ref/createuser.sgml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ PostgreSQL documentation
150150
<varlistentry>
151151
<term><option>-g <replaceable class="parameter">role</replaceable></option></term>
152152
<term><option>--member-of=<replaceable class="parameter">role</replaceable></option></term>
153+
<term><option>--role=<replaceable class="parameter">role</replaceable></option> (deprecated)</term>
153154
<listitem>
154155
<para>
155156
Specifies the new role should be automatically added as a member

‎src/bin/scripts/createuser.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ main(int argc, char *argv[])
3434
{"no-createdb",no_argument,NULL,'D'},
3535
{"echo",no_argument,NULL,'e'},
3636
{"encrypted",no_argument,NULL,'E'},
37-
{"role",required_argument,NULL,'g'},/* kept for backward
38-
* compatibility */
37+
{"role",required_argument,NULL,'g'},
3938
{"member-of",required_argument,NULL,'g'},
4039
{"host",required_argument,NULL,'h'},
4140
{"inherit",no_argument,NULL,'i'},
@@ -423,6 +422,7 @@ help(const char *progname)
423422
printf(_(" -D, --no-createdb role cannot create databases (default)\n"));
424423
printf(_(" -e, --echo show the commands being sent to the server\n"));
425424
printf(_(" -g, --member-of=ROLE new role will be a member of ROLE\n"));
425+
printf(_(" --role=ROLE (same as --member-of, deprecated)\n"));
426426
printf(_(" -i, --inherit role inherits privileges of roles it is a\n"
427427
" member of (default)\n"));
428428
printf(_(" -I, --no-inherit role does not inherit privileges\n"));

‎src/bin/scripts/t/040_createuser.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
$node->issues_sql_like(
7272
['createuser','--role','regress_user1','regress_user11' ],
7373
qr/statement: CREATE ROLE regress_user11 NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN NOREPLICATION NOBYPASSRLS IN ROLE regress_user1;/,
74-
'--role (for backward compatibility)');
74+
'--role');
7575
$node->issues_sql_like(
7676
['createuser','--member-of','regress_user1','regress_user12' ],
7777
qr/statement: CREATE ROLE regress_user12 NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN NOREPLICATION NOBYPASSRLS IN ROLE regress_user1;/,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp