Small code simplification
Author: Nathan Bossart <nathandbossart@gmail.com> Discussion: https://www.postgresql.org/message-id/20230310000313.GA3992372%40nathanxps13
This commit is contained in:
parent
4ef1be5a0b
commit
3b7cd8c690
|
@ -1378,7 +1378,7 @@ RenameRole(const char *oldname, const char *newname)
|
||||||
* Only superusers can mess with superusers. Otherwise, a user with
|
* Only superusers can mess with superusers. Otherwise, a user with
|
||||||
* CREATEROLE can rename a role for which they have ADMIN OPTION.
|
* CREATEROLE can rename a role for which they have ADMIN OPTION.
|
||||||
*/
|
*/
|
||||||
if (((Form_pg_authid) GETSTRUCT(oldtuple))->rolsuper)
|
if (authform->rolsuper)
|
||||||
{
|
{
|
||||||
if (!superuser())
|
if (!superuser())
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
|
|
Loading…
Reference in New Issue