PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
reltrigger.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * reltrigger.h
4  * POSTGRES relation trigger definitions.
5  *
6  *
7  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/utils/reltrigger.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef RELTRIGGER_H
15 #define RELTRIGGER_H
16 
17 
18 /*
19  * These struct really belongs to trigger.h, but we put it separately so that
20  * it can be cleanly included in rel.h and other places.
21  */
22 
23 typedef struct Trigger
24 {
25  Oid tgoid; /* OID of trigger (pg_trigger row) */
26  /* Remaining fields are copied from pg_trigger, see pg_trigger.h */
27  char *tgname;
30  char tgenabled;
40  char **tgargs;
41  char *tgqual;
42  char *tgoldtable;
43  char *tgnewtable;
44 } Trigger;
45 
46 typedef struct TriggerDesc
47 {
48  Trigger *triggers; /* array of Trigger structs */
49  int numtriggers; /* number of array entries */
50 
51  /*
52  * These flags indicate whether the array contains at least one of each
53  * type of trigger. We use these to skip searching the array if not.
54  */
70  /* there are no row-level truncate triggers */
73  /* Is there at least one trigger specifying each transition relation? */
78 } TriggerDesc;
79 
80 #endif /* RELTRIGGER_H */
signed short int16
Definition: c.h:255
Oid tgfoid
Definition: reltrigger.h:28
Oid tgoid
Definition: reltrigger.h:25
bool trig_insert_after_statement
Definition: reltrigger.h:59
struct Trigger Trigger
bool tgisinternal
Definition: reltrigger.h:31
bool trig_update_before_statement
Definition: reltrigger.h:63
bool trig_update_new_table
Definition: reltrigger.h:76
unsigned int Oid
Definition: postgres_ext.h:31
bool trig_insert_instead_row
Definition: reltrigger.h:57
bool trig_insert_new_table
Definition: reltrigger.h:74
char * tgqual
Definition: reltrigger.h:41
char tgenabled
Definition: reltrigger.h:30
Oid tgconstraint
Definition: reltrigger.h:34
char * tgname
Definition: reltrigger.h:27
int16 tgtype
Definition: reltrigger.h:29
bool tgdeferrable
Definition: reltrigger.h:35
bool tginitdeferred
Definition: reltrigger.h:36
bool trig_delete_after_row
Definition: reltrigger.h:66
Trigger * triggers
Definition: reltrigger.h:48
bool trig_truncate_before_statement
Definition: reltrigger.h:71
bool trig_update_after_statement
Definition: reltrigger.h:64
bool trig_delete_before_statement
Definition: reltrigger.h:68
bool trig_update_before_row
Definition: reltrigger.h:60
Oid tgconstrrelid
Definition: reltrigger.h:32
bool trig_truncate_after_statement
Definition: reltrigger.h:72
bool trig_insert_after_row
Definition: reltrigger.h:56
bool trig_update_old_table
Definition: reltrigger.h:75
bool trig_update_after_row
Definition: reltrigger.h:61
bool trig_update_instead_row
Definition: reltrigger.h:62
int numtriggers
Definition: reltrigger.h:49
char ** tgargs
Definition: reltrigger.h:40
bool trig_insert_before_row
Definition: reltrigger.h:55
bool trig_delete_instead_row
Definition: reltrigger.h:67
int16 * tgattr
Definition: reltrigger.h:39
char * tgnewtable
Definition: reltrigger.h:43
bool trig_delete_after_statement
Definition: reltrigger.h:69
Oid tgconstrindid
Definition: reltrigger.h:33
bool trig_insert_before_statement
Definition: reltrigger.h:58
struct TriggerDesc TriggerDesc
int16 tgnattr
Definition: reltrigger.h:38
int16 tgnargs
Definition: reltrigger.h:37
bool trig_delete_old_table
Definition: reltrigger.h:77
char * tgoldtable
Definition: reltrigger.h:42
bool trig_delete_before_row
Definition: reltrigger.h:65