mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
pgindent run for 9.6
This commit is contained in:
@ -302,7 +302,7 @@ CreateRole(CreateRoleStmt *stmt)
|
||||
if (!superuser())
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
errmsg("must be superuser to change bypassrls attribute")));
|
||||
errmsg("must be superuser to change bypassrls attribute")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -320,8 +320,8 @@ CreateRole(CreateRoleStmt *stmt)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_RESERVED_NAME),
|
||||
errmsg("role name \"%s\" is reserved",
|
||||
stmt->role),
|
||||
errdetail("Role names starting with \"pg_\" are reserved.")));
|
||||
stmt->role),
|
||||
errdetail("Role names starting with \"pg_\" are reserved.")));
|
||||
|
||||
/*
|
||||
* Check the pg_authid relation to be certain the role doesn't already
|
||||
@ -977,7 +977,7 @@ DropRole(DropRoleStmt *stmt)
|
||||
if (rolspec->roletype != ROLESPEC_CSTRING)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("cannot use special role specifier in DROP ROLE")));
|
||||
errmsg("cannot use special role specifier in DROP ROLE")));
|
||||
role = rolspec->rolename;
|
||||
|
||||
tuple = SearchSysCache1(AUTHNAME, PointerGetDatum(role));
|
||||
@ -1167,22 +1167,22 @@ RenameRole(const char *oldname, const char *newname)
|
||||
errmsg("current user cannot be renamed")));
|
||||
|
||||
/*
|
||||
* Check that the user is not trying to rename a system role and
|
||||
* not trying to rename a role into the reserved "pg_" namespace.
|
||||
* Check that the user is not trying to rename a system role and not
|
||||
* trying to rename a role into the reserved "pg_" namespace.
|
||||
*/
|
||||
if (IsReservedName(NameStr(authform->rolname)))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_RESERVED_NAME),
|
||||
errmsg("role name \"%s\" is reserved",
|
||||
NameStr(authform->rolname)),
|
||||
errdetail("Role names starting with \"pg_\" are reserved.")));
|
||||
NameStr(authform->rolname)),
|
||||
errdetail("Role names starting with \"pg_\" are reserved.")));
|
||||
|
||||
if (IsReservedName(newname))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_RESERVED_NAME),
|
||||
errmsg("role name \"%s\" is reserved",
|
||||
newname),
|
||||
errdetail("Role names starting with \"pg_\" are reserved.")));
|
||||
newname),
|
||||
errdetail("Role names starting with \"pg_\" are reserved.")));
|
||||
|
||||
/* make sure the new name doesn't exist */
|
||||
if (SearchSysCacheExists1(AUTHNAME, CStringGetDatum(newname)))
|
||||
|
Reference in New Issue
Block a user