PostgreSQL Source Code  git master
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-2021, 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;
32  bool tgisclone;
41  char **tgargs;
42  char *tgqual;
43  char *tgoldtable;
44  char *tgnewtable;
46 
47 typedef struct TriggerDesc
48 {
49  Trigger *triggers; /* array of Trigger structs */
50  int numtriggers; /* number of array entries */
51 
52  /*
53  * These flags indicate whether the array contains at least one of each
54  * type of trigger. We use these to skip searching the array if not.
55  */
71  /* there are no row-level truncate triggers */
74  /* Is there at least one trigger specifying each transition relation? */
80 
81 #endif /* RELTRIGGER_H */
signed short int16
Definition: c.h:428
unsigned int Oid
Definition: postgres_ext.h:31
struct TriggerDesc TriggerDesc
struct Trigger Trigger
int numtriggers
Definition: reltrigger.h:50
bool trig_delete_before_row
Definition: reltrigger.h:66
bool trig_update_instead_row
Definition: reltrigger.h:63
Trigger * triggers
Definition: reltrigger.h:49
bool trig_delete_instead_row
Definition: reltrigger.h:68
bool trig_update_after_row
Definition: reltrigger.h:62
bool trig_insert_instead_row
Definition: reltrigger.h:58
bool trig_update_new_table
Definition: reltrigger.h:77
bool trig_insert_after_row
Definition: reltrigger.h:57
bool trig_update_after_statement
Definition: reltrigger.h:65
bool trig_update_before_row
Definition: reltrigger.h:61
bool trig_truncate_before_statement
Definition: reltrigger.h:72
bool trig_insert_new_table
Definition: reltrigger.h:75
bool trig_update_before_statement
Definition: reltrigger.h:64
bool trig_truncate_after_statement
Definition: reltrigger.h:73
bool trig_insert_before_statement
Definition: reltrigger.h:59
bool trig_delete_old_table
Definition: reltrigger.h:78
bool trig_delete_after_row
Definition: reltrigger.h:67
bool trig_insert_before_row
Definition: reltrigger.h:56
bool trig_delete_after_statement
Definition: reltrigger.h:70
bool trig_delete_before_statement
Definition: reltrigger.h:69
bool trig_update_old_table
Definition: reltrigger.h:76
bool trig_insert_after_statement
Definition: reltrigger.h:60
char tgenabled
Definition: reltrigger.h:30
Oid tgoid
Definition: reltrigger.h:25
char * tgoldtable
Definition: reltrigger.h:43
char * tgnewtable
Definition: reltrigger.h:44
Oid tgconstrindid
Definition: reltrigger.h:34
Oid tgconstraint
Definition: reltrigger.h:35
Oid tgconstrrelid
Definition: reltrigger.h:33
char * tgname
Definition: reltrigger.h:27
Oid tgfoid
Definition: reltrigger.h:28
int16 tgnargs
Definition: reltrigger.h:38
char * tgqual
Definition: reltrigger.h:42
int16 tgnattr
Definition: reltrigger.h:39
bool tgdeferrable
Definition: reltrigger.h:36
bool tginitdeferred
Definition: reltrigger.h:37
bool tgisinternal
Definition: reltrigger.h:31
char ** tgargs
Definition: reltrigger.h:41
int16 tgtype
Definition: reltrigger.h:29
int16 * tgattr
Definition: reltrigger.h:40
bool tgisclone
Definition: reltrigger.h:32