PostgreSQL Source Code git master
Loading...
Searching...
No Matches
usercontext.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * usercontext.h
4 * Convenience functions for running code as a different database user.
5 *
6 *-------------------------------------------------------------------------
7 */
8#ifndef USERCONTEXT_H
9#define USERCONTEXT_H
10
11/*
12 * When temporarily changing to run as a different user, this structure
13 * holds the details needed to restore the original state.
14 */
21
22/* Function prototypes. */
23extern void SwitchToUntrustedUser(Oid userid, UserContext *context);
24extern void RestoreUserContext(UserContext *context);
25
26#endif /* USERCONTEXT_H */
unsigned int Oid
int save_sec_context
Definition usercontext.h:18
int save_nestlevel
Definition usercontext.h:19
void SwitchToUntrustedUser(Oid userid, UserContext *context)
Definition usercontext.c:33
void RestoreUserContext(UserContext *context)
Definition usercontext.c:87