-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtrigger_funcs.h
35 lines (27 loc) · 935 Bytes
/
trigger_funcs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*-------------------------------------------------------------------------
*
* trigger_funcs.h
* Declarations for event trigger creation and invocation functions.
*
*
* pg_schema_triggers/trigger_funcs.h
*
*-------------------------------------------------------------------------
*/
#ifndef SCHEMA_TRIGGERS_TRIGGER_FUNCS_H
#define SCHEMA_TRIGGERS_TRIGGER_FUNCS_H
#include "postgres.h"
#include "lib/ilist.h"
typedef struct EventInfo {
char eventname[NAMEDATALEN];
dlist_node event_list_node;
} EventInfo;
void StartNewEvent(void);
void EnterEventMemoryContext(void);
void LeaveEventMemoryContext(void);
void EndEvent(void);
EventInfo *EventInfoAlloc(const char *eventname, size_t struct_size);
Oid CreateEventTriggerEx(const char *eventname, const char *trigname, Oid trigfunc);
void EnqueueEvent(EventInfo *info);
EventInfo* GetCurrentEvent(const char *eventname);
#endif /* SCHEMA_TRIGGERS_TRIGGER_FUNCS_H */