diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2015-07-20 18:47:15 +0200 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2015-07-20 18:47:15 +0200 |
commit | 869eb8416255da99fe5ba1f6d98e52a41999d30e (patch) | |
tree | 01c5a688f00fd4c6ad3d21cef61148838f18d88a | |
parent | 691c32f69a7efd6af9cda100c7e5ebf3b0c1937c (diff) | |
download | postgresql-869eb8416255da99fe5ba1f6d98e52a41999d30e.tar.gz postgresql-869eb8416255da99fe5ba1f6d98e52a41999d30e.zip |
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 31eae6028ec. Remove them.
Backpatch to 9.5.
Noted and patch by Jeevan Chalke
-rw-r--r-- | src/backend/commands/user.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 5b20994028d..afbf2763be6 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -311,13 +311,6 @@ CreateRole(CreateRoleStmt *stmt) errmsg("permission denied to create role"))); } - if (strcmp(stmt->role, "public") == 0 || - strcmp(stmt->role, "none") == 0) - ereport(ERROR, - (errcode(ERRCODE_RESERVED_NAME), - errmsg("role name \"%s\" is reserved", - stmt->role))); - /* * Check the pg_authid relation to be certain the role doesn't already * exist. @@ -1159,13 +1152,6 @@ RenameRole(const char *oldname, const char *newname) (errcode(ERRCODE_DUPLICATE_OBJECT), errmsg("role \"%s\" already exists", newname))); - if (strcmp(newname, "public") == 0 || - strcmp(newname, "none") == 0) - ereport(ERROR, - (errcode(ERRCODE_RESERVED_NAME), - errmsg("role name \"%s\" is reserved", - newname))); - /* * createrole is enough privilege unless you want to mess with a superuser */ |