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

Function GetUserIdAndSecContext

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

* GetUserIdAndSecContext/SetUserIdAndSecContext - get/set the current user ID * and the SecurityRestrictionContext flags. * * Currently there are three valid bits in SecurityRestrictionContext: * * SECURITY_LOCAL_USERID_CHANGE indicates that we are inside an operation * that is temporarily changing CurrentUserId via these functions. This is * needed to indicate that the actual value of Cur

Source from the content-addressed store, hash-verified

611 * through AbortTransaction without asserting in case InitPostgres fails.
612 */
613void
614GetUserIdAndSecContext(Oid *userid, int *sec_context)
615{
616 *userid = CurrentUserId;
617 *sec_context = SecurityRestrictionContext;
618}
619
620void
621SetUserIdAndSecContext(Oid userid, int sec_context)

Callers 15

bt_index_check_internalFunction · 0.85
ri_PlanCheckFunction · 0.85
ri_PerformCheckFunction · 0.85
fmgr_security_definerFunction · 0.85
do_analyze_relFunction · 0.85
vacuum_relFunction · 0.85
DefineIndexFunction · 0.85
execute_extension_scriptFunction · 0.85
cluster_relFunction · 0.85
ExecRefreshMatViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected