From 3b7cd8c690f294185c1ba074fb7efdf687829361 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 16 Mar 2023 15:33:43 +0100 Subject: [PATCH] Small code simplification Author: Nathan Bossart Discussion: https://www.postgresql.org/message-id/20230310000313.GA3992372%40nathanxps13 --- src/backend/commands/user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 3a92e930c0..43fe530a96 100644 --- a/src/backend/commands/user.c +++ b/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, -- 2.39.5