Skip to content

Commit 3b7cd8c

Browse files
committed
Small code simplification
Author: Nathan Bossart <nathandbossart@gmail.com> Discussion: https://www.postgresql.org/message-id/20230310000313.GA3992372%40nathanxps13
1 parent 4ef1be5 commit 3b7cd8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/commands/user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ RenameRole(const char *oldname, const char *newname)
13781378
* Only superusers can mess with superusers. Otherwise, a user with
13791379
* CREATEROLE can rename a role for which they have ADMIN OPTION.
13801380
*/
1381-
if (((Form_pg_authid) GETSTRUCT(oldtuple))->rolsuper)
1381+
if (authform->rolsuper)
13821382
{
13831383
if (!superuser())
13841384
ereport(ERROR,

0 commit comments

Comments
 (0)