You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
errmsg("Non-superuser owned event trigger must execute a non-superuser owned function")
858
-
, errdetail("The current user \"%s\" is not a superuser and the function \"%s\" is owned by a superuser", current_role_name, NameListToString(stmt->funcname))
855
+
, errdetail("The current user \"%s\" is not a superuser and the function \"%s\" is owned by a superuser", GetUserNameFromId(current_user_id, false), NameListToString(stmt->funcname))
errmsg("Superuser owned event trigger must execute a superuser owned function")
865
-
, errdetail("The current user \"%s\" is a superuser and the function \"%s\" is owned by a non-superuser", current_role_name, NameListToString(stmt->funcname))
862
+
, errdetail("The current user \"%s\" is a superuser and the function \"%s\" is owned by a non-superuser", GetUserNameFromId(current_user_id, false), NameListToString(stmt->funcname))
makeDefElem("superuser", (Node*) makeInteger(make_super), -1) // using makeInteger because makeBoolean is not available on pg <= 14
95
+
);
96
+
97
+
#ifPG15_GTE
98
+
AlterRole(NULL, alter_stmt);
99
+
#else
100
+
AlterRole(alter_stmt);
101
+
#endif
102
+
103
+
CommandCounterIncrement();
104
+
}
105
+
84
106
// Changes the OWNER of a database object.
85
107
// Some objects (e.g. foreign data wrappers) can only be owned by superusers, so this switches to superuser accordingly and then goes backs to non-super.
0 commit comments