PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "miscadmin.h"
#include "utils/acl.h"
#include "utils/guc.h"
#include "utils/usercontext.h"
Go to the source code of this file.
Functions | |
void | SwitchToUntrustedUser (Oid userid, UserContext *context) |
void | RestoreUserContext (UserContext *context) |
void RestoreUserContext | ( | UserContext * | context | ) |
Definition at line 87 of file usercontext.c.
References AtEOXact_GUC(), context, and SetUserIdAndSecContext().
Referenced by apply_handle_delete(), apply_handle_insert(), apply_handle_update(), ExecuteTruncateGuts(), and LogicalRepSyncTableStart().
void SwitchToUntrustedUser | ( | Oid | userid, |
UserContext * | context | ||
) |
Definition at line 33 of file usercontext.c.
References context, ereport, errcode(), errmsg(), ERROR, GetUserIdAndSecContext(), GetUserNameFromId(), member_can_set_role(), NewGUCNestLevel(), SECURITY_RESTRICTED_OPERATION, and SetUserIdAndSecContext().
Referenced by apply_handle_delete(), apply_handle_insert(), apply_handle_update(), ExecuteTruncateGuts(), and LogicalRepSyncTableStart().