52 int cacheid,
uint32 hashvalue);
160 evtevent =
NameStr(form->evtevent);
161 if (strcmp(evtevent,
"ddl_command_start") == 0)
163 else if (strcmp(evtevent,
"ddl_command_end") == 0)
165 else if (strcmp(evtevent,
"sql_drop") == 0)
167 else if (strcmp(evtevent,
"table_rewrite") == 0)
169 else if (strcmp(evtevent,
"login") == 0)
176 item->
fnoid = form->evtfoid;
177 item->
enabled = form->evtenabled;
180 evttags =
heap_getattr(tup, Anum_pg_event_trigger_evttags,
234 for (bms = NULL,
i = 0;
i < nelems; ++
i)
#define DatumGetArrayTypeP(X)
void deconstruct_array_builtin(ArrayType *array, Oid elmtype, Datum **elemsp, bool **nullsp, int *nelemsp)
Bitmapset * bms_add_member(Bitmapset *a, int x)
#define TextDatumGetCString(d)
void CreateCacheMemoryContext(void)
CommandTag GetCommandTagEnum(const char *commandname)
void * hash_search(HTAB *hashp, const void *keyPtr, HASHACTION action, bool *foundPtr)
HTAB * hash_create(const char *tabname, long nelem, const HASHCTL *info, int flags)
static void BuildEventTriggerCache(void)
static void InvalidateEventCacheCallback(Datum arg, int cacheid, uint32 hashvalue)
static MemoryContext EventTriggerCacheContext
EventTriggerCacheStateType
static Bitmapset * DecodeTextArrayToBitmapset(Datum array)
List * EventCacheLookup(EventTriggerEvent event)
static HTAB * EventTriggerCache
static EventTriggerCacheStateType EventTriggerCacheState
SysScanDesc systable_beginscan_ordered(Relation heapRelation, Relation indexRelation, Snapshot snapshot, int nkeys, ScanKey key)
void systable_endscan_ordered(SysScanDesc sysscan)
HeapTuple systable_getnext_ordered(SysScanDesc sysscan, ScanDirection direction)
#define HeapTupleIsValid(tuple)
static Datum heap_getattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
void index_close(Relation relation, LOCKMODE lockmode)
Relation index_open(Oid relationId, LOCKMODE lockmode)
void CacheRegisterSyscacheCallback(int cacheid, SyscacheCallbackFunction func, Datum arg)
List * lappend(List *list, void *datum)
void MemoryContextReset(MemoryContext context)
void pfree(void *pointer)
void * palloc0(Size size)
MemoryContext CacheMemoryContext
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
FormData_pg_event_trigger * Form_pg_event_trigger
MemoryContextSwitchTo(old_ctx)
#define RelationGetDescr(relation)
void relation_close(Relation relation, LOCKMODE lockmode)
Relation relation_open(Oid relationId, LOCKMODE lockmode)