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

Commite52b690

Browse files
committed
Don't handle PUBLIC/NONE separately
Since those role specifiers are checked in the grammar, there's no needfor the old checks to remain in place after31eae60. Remove them.Backpatch to 9.5.Noted and patch by Jeevan Chalke
1 parent97f3014 commite52b690

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

‎src/backend/commands/user.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,6 @@ CreateRole(CreateRoleStmt *stmt)
311311
errmsg("permission denied to create role")));
312312
}
313313

314-
if (strcmp(stmt->role,"public")==0||
315-
strcmp(stmt->role,"none")==0)
316-
ereport(ERROR,
317-
(errcode(ERRCODE_RESERVED_NAME),
318-
errmsg("role name \"%s\" is reserved",
319-
stmt->role)));
320-
321314
/*
322315
* Check the pg_authid relation to be certain the role doesn't already
323316
* exist.
@@ -1159,13 +1152,6 @@ RenameRole(const char *oldname, const char *newname)
11591152
(errcode(ERRCODE_DUPLICATE_OBJECT),
11601153
errmsg("role \"%s\" already exists",newname)));
11611154

1162-
if (strcmp(newname,"public")==0||
1163-
strcmp(newname,"none")==0)
1164-
ereport(ERROR,
1165-
(errcode(ERRCODE_RESERVED_NAME),
1166-
errmsg("role name \"%s\" is reserved",
1167-
newname)));
1168-
11691155
/*
11701156
* createrole is enough privilege unless you want to mess with a superuser
11711157
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp