PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/genam.h"
#include "access/htup_details.h"
#include "access/relation.h"
#include "catalog/pg_event_trigger.h"
#include "catalog/pg_type.h"
#include "commands/trigger.h"
#include "tcop/cmdtag.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/catcache.h"
#include "utils/evtcache.h"
#include "utils/hsearch.h"
#include "utils/inval.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
struct | EventTriggerCacheEntry |
Enumerations | |
enum | EventTriggerCacheStateType { ETCS_NEEDS_REBUILD , ETCS_REBUILD_STARTED , ETCS_VALID } |
Functions | |
static void | BuildEventTriggerCache (void) |
static void | InvalidateEventCacheCallback (Datum arg, int cacheid, uint32 hashvalue) |
static Bitmapset * | DecodeTextArrayToBitmapset (Datum array) |
List * | EventCacheLookup (EventTriggerEvent event) |
Variables | |
static HTAB * | EventTriggerCache |
static MemoryContext | EventTriggerCacheContext |
static EventTriggerCacheStateType | EventTriggerCacheState = ETCS_NEEDS_REBUILD |
Enumerator | |
---|---|
ETCS_NEEDS_REBUILD | |
ETCS_REBUILD_STARTED | |
ETCS_VALID |
Definition at line 33 of file evtcache.c.
|
static |
Definition at line 77 of file evtcache.c.
References AccessShareLock, ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, CacheMemoryContext, CacheRegisterSyscacheCallback(), CreateCacheMemoryContext(), ctl, DecodeTextArrayToBitmapset(), EventTriggerCacheItem::enabled, ETCS_REBUILD_STARTED, ETCS_VALID, EventTriggerCache, EventTriggerCacheContext, EventTriggerCacheState, EVT_DDLCommandEnd, EVT_DDLCommandStart, EVT_Login, EVT_SQLDrop, EVT_TableRewrite, EventTriggerCacheItem::fnoid, ForwardScanDirection, GETSTRUCT, HASH_BLOBS, HASH_CONTEXT, hash_create(), HASH_ELEM, HASH_ENTER, hash_search(), heap_getattr(), HeapTupleIsValid, index_close(), index_open(), InvalidateEventCacheCallback(), lappend(), list_make1, MemoryContextReset(), MemoryContextSwitchTo(), NameStr, palloc0(), relation_close(), relation_open(), RelationGetDescr, systable_beginscan_ordered(), systable_endscan_ordered(), systable_getnext_ordered(), EventTriggerCacheItem::tagset, TRIGGER_DISABLED, and EventTriggerCacheEntry::triggerlist.
Referenced by EventCacheLookup().
Definition at line 222 of file evtcache.c.
References ARR_ELEMTYPE, ARR_HASNULL, ARR_NDIM, bms_add_member(), DatumGetArrayTypeP, deconstruct_array_builtin(), elog, ERROR, GetCommandTagEnum(), i, pfree(), str, and TextDatumGetCString.
Referenced by BuildEventTriggerCache().
List* EventCacheLookup | ( | EventTriggerEvent | event | ) |
Definition at line 63 of file evtcache.c.
References BuildEventTriggerCache(), ETCS_VALID, EventTriggerCache, EventTriggerCacheState, HASH_FIND, hash_search(), NIL, and EventTriggerCacheEntry::triggerlist.
Referenced by EventTriggerCommonSetup(), and trackDroppedObjectsNeeded().
Definition at line 255 of file evtcache.c.
References ETCS_NEEDS_REBUILD, ETCS_VALID, EventTriggerCache, EventTriggerCacheContext, EventTriggerCacheState, and MemoryContextReset().
Referenced by BuildEventTriggerCache().
|
static |
Definition at line 46 of file evtcache.c.
Referenced by BuildEventTriggerCache(), EventCacheLookup(), and InvalidateEventCacheCallback().
|
static |
Definition at line 47 of file evtcache.c.
Referenced by BuildEventTriggerCache(), and InvalidateEventCacheCallback().
|
static |
Definition at line 48 of file evtcache.c.
Referenced by BuildEventTriggerCache(), EventCacheLookup(), and InvalidateEventCacheCallback().