2
0

evtcache.h 924 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*-------------------------------------------------------------------------
  2. *
  3. * evtcache.h
  4. * Special-purpose cache for event trigger data.
  5. *
  6. * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  7. * Portions Copyright (c) 1994, Regents of the University of California
  8. *
  9. * IDENTIFICATION
  10. * src/include/utils/evtcache.h
  11. *
  12. *-------------------------------------------------------------------------
  13. */
  14. #ifndef EVTCACHE_H
  15. #define EVTCACHE_H
  16. #include "nodes/bitmapset.h"
  17. #include "nodes/pg_list.h"
  18. typedef enum
  19. {
  20. EVT_DDLCommandStart,
  21. EVT_DDLCommandEnd,
  22. EVT_SQLDrop,
  23. EVT_TableRewrite
  24. } EventTriggerEvent;
  25. typedef struct
  26. {
  27. Oid fnoid; /* function to be called */
  28. char enabled; /* as SESSION_REPLICATION_ROLE_* */
  29. Bitmapset *tagset; /* command tags, or NULL if empty */
  30. } EventTriggerCacheItem;
  31. extern List *EventCacheLookup(EventTriggerEvent event);
  32. #endif /* EVTCACHE_H */