index 3a92e930c065ab13dac690fafd01736f5ee33883..43fe530a96d3a0902f118710e23173ec43540f07 100644 (file)
@@ -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,