Skip to content

Commit e52b690

Browse files
committed
Don't handle PUBLIC/NONE separately
Since those role specifiers are checked in the grammar, there's no need for the old checks to remain in place after 31eae60. Remove them. Backpatch to 9.5. Noted and patch by Jeevan Chalke
1 parent 97f3014 commit e52b690

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)
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