summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera2015-07-20 16:47:15 +0000
committerAlvaro Herrera2015-07-20 16:47:15 +0000
commite52b690cf55f303839f12f8f1f136d2366d36298 (patch)
tree72439ca35992d7a1c356b5edb4e73dcf9637f00b
parent97f3014647a5bd570032abd2b809d3233003f13f (diff)
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.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index 5b20994028..afbf2763be 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
*/