aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-03-16 15:33:43 +0100
committerPeter Eisentraut <peter@eisentraut.org>2023-03-16 15:33:43 +0100
commit3b7cd8c690f294185c1ba074fb7efdf687829361 (patch)
tree2135ab249fec2777b466e75ed7310c702d9f80c1 /src
parent4ef1be5a0b676a9f030cc2e4837f4b5650ecb069 (diff)
downloadpostgresql-3b7cd8c690f294185c1ba074fb7efdf687829361.tar.gz
postgresql-3b7cd8c690f294185c1ba074fb7efdf687829361.zip
Small code simplification
Author: Nathan Bossart <nathandbossart@gmail.com> Discussion: https://www.postgresql.org/message-id/20230310000313.GA3992372%40nathanxps13
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index 3a92e930c06..43fe530a96d 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,