gooderp18绿色标准版
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

45 行
1.2KB

  1. /*-------------------------------------------------------------------------
  2. *
  3. * session.h
  4. * Encapsulation of user session.
  5. *
  6. * Copyright (c) 2017-2019, PostgreSQL Global Development Group
  7. *
  8. * src/include/access/session.h
  9. *
  10. *-------------------------------------------------------------------------
  11. */
  12. #ifndef SESSION_H
  13. #define SESSION_H
  14. #include "lib/dshash.h"
  15. /* Avoid including typcache.h */
  16. struct SharedRecordTypmodRegistry;
  17. /*
  18. * A struct encapsulating some elements of a user's session. For now this
  19. * manages state that applies to parallel query, but in principle it could
  20. * include other things that are currently global variables.
  21. */
  22. typedef struct Session
  23. {
  24. dsm_segment *segment; /* The session-scoped DSM segment. */
  25. dsa_area *area; /* The session-scoped DSA area. */
  26. /* State managed by typcache.c. */
  27. struct SharedRecordTypmodRegistry *shared_typmod_registry;
  28. dshash_table *shared_record_table;
  29. dshash_table *shared_typmod_table;
  30. } Session;
  31. extern void InitializeSession(void);
  32. extern dsm_handle GetSessionDsmHandle(void);
  33. extern void AttachSession(dsm_handle handle);
  34. extern void DetachSession(void);
  35. /* The current session, or NULL for none. */
  36. extern Session *CurrentSession;
  37. #endif /* SESSION_H */
上海开阖软件有限公司 沪ICP备12045867号-1