MCPcopy Create free account
hub / github.com/apache/cloudberry / SetSessionUserId

Function SetSessionUserId

src/backend/utils/init/miscinit.c:537–549  ·  view source on GitHub ↗

extern so DispatchAgent can use this (postgres.c) */

Source from the content-addressed store, hash-verified

535
536/* extern so DispatchAgent can use this (postgres.c) */
537extern void
538SetSessionUserId(Oid userid, bool is_superuser)
539{
540 AssertState(SecurityRestrictionContext == 0);
541 AssertArg(OidIsValid(userid));
542 SessionUserId = userid;
543 SessionUserIsSuperuser = is_superuser;
544 SetRoleIsActive = false;
545
546 /* We force the effective user IDs to match, too */
547 OuterUserId = userid;
548 CurrentUserId = userid;
549}
550
551bool
552IsAuthenticatedUserSuperUser()

Callers 5

PostgresMainFunction · 0.85
InitializeSessionUserIdFunction · 0.85
SetSessionAuthorizationFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68