Consistently use "superuser" instead of "super user"
[pgsql.git] / src / include / access / session.h
blob82cee5aff573f62a1f218733f09321d4f8295542
1 /*-------------------------------------------------------------------------
3 * session.h
4 * Encapsulation of user session.
6 * Copyright (c) 2017-2021, PostgreSQL Global Development Group
8 * src/include/access/session.h
10 *-------------------------------------------------------------------------
12 #ifndef SESSION_H
13 #define SESSION_H
15 #include "lib/dshash.h"
17 /* Avoid including typcache.h */
18 struct SharedRecordTypmodRegistry;
21 * A struct encapsulating some elements of a user's session. For now this
22 * manages state that applies to parallel query, but in principle it could
23 * include other things that are currently global variables.
25 typedef struct Session
27 dsm_segment *segment; /* The session-scoped DSM segment. */
28 dsa_area *area; /* The session-scoped DSA area. */
30 /* State managed by typcache.c. */
31 struct SharedRecordTypmodRegistry *shared_typmod_registry;
32 dshash_table *shared_record_table;
33 dshash_table *shared_typmod_table;
34 } Session;
36 extern void InitializeSession(void);
37 extern dsm_handle GetSessionDsmHandle(void);
38 extern void AttachSession(dsm_handle handle);
39 extern void DetachSession(void);
41 /* The current session, or NULL for none. */
42 extern Session *CurrentSession;
44 #endif /* SESSION_H */