mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Small code simplification
Author: Nathan Bossart <nathandbossart@gmail.com> Discussion: https://www.postgresql.org/message-id/20230310000313.GA3992372%40nathanxps13
This commit is contained in:
@ -1378,7 +1378,7 @@ RenameRole(const char *oldname, const char *newname)
|
||||
* Only superusers can mess with superusers. Otherwise, a user with
|
||||
* CREATEROLE can rename a role for which they have ADMIN OPTION.
|
||||
*/
|
||||
if (((Form_pg_authid) GETSTRUCT(oldtuple))->rolsuper)
|
||||
if (authform->rolsuper)
|
||||
{
|
||||
if (!superuser())
|
||||
ereport(ERROR,
|
||||
|
Reference in New Issue
Block a user