1 /*-------------------------------------------------------------------------
4 * POSTGRES relation trigger definitions.
7 * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/utils/reltrigger.h
12 *-------------------------------------------------------------------------
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.
23 typedef struct Trigger
25 Oid tgoid; /* OID of trigger (pg_trigger row) */
26 /* Remaining fields are copied from pg_trigger, see pg_trigger.h */
44 typedef struct TriggerDesc
46 Trigger *triggers; /* array of Trigger structs */
47 int numtriggers; /* number of array entries */
50 * These flags indicate whether the array contains at least one of each
51 * type of trigger. We use these to skip searching the array if not.
53 bool trig_insert_before_row;
54 bool trig_insert_after_row;
55 bool trig_insert_instead_row;
56 bool trig_insert_before_statement;
57 bool trig_insert_after_statement;
58 bool trig_update_before_row;
59 bool trig_update_after_row;
60 bool trig_update_instead_row;
61 bool trig_update_before_statement;
62 bool trig_update_after_statement;
63 bool trig_delete_before_row;
64 bool trig_delete_after_row;
65 bool trig_delete_instead_row;
66 bool trig_delete_before_statement;
67 bool trig_delete_after_statement;
68 /* there are no row-level truncate triggers */
69 bool trig_truncate_before_statement;
70 bool trig_truncate_after_statement;
73 #endif /* RELTRIGGER_H */