memory_context.h 953 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <yql/essentials/core/pg_settings/guc_settings.h>
  3. #include <util/generic/string.h>
  4. extern "C" {
  5. #include "c.h"
  6. #include "postgres.h"
  7. #include "access/htup.h"
  8. #include "datatype/timestamp.h"
  9. #include "miscadmin.h"
  10. #include "utils/palloc.h"
  11. #include "nodes/memnodes.h"
  12. #include "utils/typcache.h"
  13. }
  14. #undef TypeName
  15. #undef Max
  16. #undef bind
  17. struct TMainContext {
  18. MemoryContextData Data;
  19. MemoryContextData ErrorData;
  20. MemoryContext PrevCurrentMemoryContext = nullptr;
  21. MemoryContext PrevErrorContext = nullptr;
  22. MemoryContext PrevCacheMemoryContext = nullptr;
  23. RecordCacheState CurrentRecordCacheState = { NULL, NULL, 0, 0, INVALID_TUPLEDESC_IDENTIFIER };
  24. RecordCacheState PrevRecordCacheState;
  25. TimestampTz StartTimestamp;
  26. pg_stack_base_t PrevStackBase;
  27. TString LastError;
  28. TGUCSettings::TPtr GUCSettings;
  29. HeapTuple CurrentDatabaseName = nullptr;
  30. HeapTuple CurrentUserName = nullptr;
  31. };