Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
usercontext.h27 linesDownload Raw Back to utils
1/*-------------------------------------------------------------------------2 *3 * usercontext.h4 *	  Convenience functions for running code as a different database user.5 *6 *-------------------------------------------------------------------------7 */8#ifndef USERCONTEXT_H9#define USERCONTEXT_H10 11/*12 * When temporarily changing to run as a different user, this structure13 * holds the details needed to restore the original state.14 */15typedef struct UserContext16{17	Oid			save_userid;18	int			save_sec_context;19	int			save_nestlevel;20} UserContext;21 22/* Function prototypes. */23extern void SwitchToUntrustedUser(Oid userid, UserContext *context);24extern void RestoreUserContext(UserContext *context);25 26#endif							/* USERCONTEXT_H */27 
codekingpro/portable-devtools · Team Ai