Small code simplification

Author: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://www.postgresql.org/message-id/20230310000313.GA3992372%40nathanxps13
pull/137/head
Peter Eisentraut 2 years ago
parent 4ef1be5a0b
commit 3b7cd8c690
  1. 2
      src/backend/commands/user.c

@ -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,

Loading…
Cancel
Save