#include "catalog/genbki.h"
Go to the source code of this file.
Defines | |
#define | TriggerRelationId 2620 |
#define | Natts_pg_trigger 15 |
#define | Anum_pg_trigger_tgrelid 1 |
#define | Anum_pg_trigger_tgname 2 |
#define | Anum_pg_trigger_tgfoid 3 |
#define | Anum_pg_trigger_tgtype 4 |
#define | Anum_pg_trigger_tgenabled 5 |
#define | Anum_pg_trigger_tgisinternal 6 |
#define | Anum_pg_trigger_tgconstrrelid 7 |
#define | Anum_pg_trigger_tgconstrindid 8 |
#define | Anum_pg_trigger_tgconstraint 9 |
#define | Anum_pg_trigger_tgdeferrable 10 |
#define | Anum_pg_trigger_tginitdeferred 11 |
#define | Anum_pg_trigger_tgnargs 12 |
#define | Anum_pg_trigger_tgattr 13 |
#define | Anum_pg_trigger_tgargs 14 |
#define | Anum_pg_trigger_tgqual 15 |
#define | TRIGGER_TYPE_ROW (1 << 0) |
#define | TRIGGER_TYPE_BEFORE (1 << 1) |
#define | TRIGGER_TYPE_INSERT (1 << 2) |
#define | TRIGGER_TYPE_DELETE (1 << 3) |
#define | TRIGGER_TYPE_UPDATE (1 << 4) |
#define | TRIGGER_TYPE_TRUNCATE (1 << 5) |
#define | TRIGGER_TYPE_INSTEAD (1 << 6) |
#define | TRIGGER_TYPE_LEVEL_MASK (TRIGGER_TYPE_ROW) |
#define | TRIGGER_TYPE_STATEMENT 0 |
#define | TRIGGER_TYPE_TIMING_MASK (TRIGGER_TYPE_BEFORE | TRIGGER_TYPE_INSTEAD) |
#define | TRIGGER_TYPE_AFTER 0 |
#define | TRIGGER_TYPE_EVENT_MASK (TRIGGER_TYPE_INSERT | TRIGGER_TYPE_DELETE | TRIGGER_TYPE_UPDATE | TRIGGER_TYPE_TRUNCATE) |
#define | TRIGGER_CLEAR_TYPE(type) ((type) = 0) |
#define | TRIGGER_SETT_ROW(type) ((type) |= TRIGGER_TYPE_ROW) |
#define | TRIGGER_SETT_STATEMENT(type) ((type) |= TRIGGER_TYPE_STATEMENT) |
#define | TRIGGER_SETT_BEFORE(type) ((type) |= TRIGGER_TYPE_BEFORE) |
#define | TRIGGER_SETT_AFTER(type) ((type) |= TRIGGER_TYPE_AFTER) |
#define | TRIGGER_SETT_INSTEAD(type) ((type) |= TRIGGER_TYPE_INSTEAD) |
#define | TRIGGER_SETT_INSERT(type) ((type) |= TRIGGER_TYPE_INSERT) |
#define | TRIGGER_SETT_DELETE(type) ((type) |= TRIGGER_TYPE_DELETE) |
#define | TRIGGER_SETT_UPDATE(type) ((type) |= TRIGGER_TYPE_UPDATE) |
#define | TRIGGER_SETT_TRUNCATE(type) ((type) |= TRIGGER_TYPE_TRUNCATE) |
#define | TRIGGER_FOR_ROW(type) ((type) & TRIGGER_TYPE_ROW) |
#define | TRIGGER_FOR_BEFORE(type) (((type) & TRIGGER_TYPE_TIMING_MASK) == TRIGGER_TYPE_BEFORE) |
#define | TRIGGER_FOR_AFTER(type) (((type) & TRIGGER_TYPE_TIMING_MASK) == TRIGGER_TYPE_AFTER) |
#define | TRIGGER_FOR_INSTEAD(type) (((type) & TRIGGER_TYPE_TIMING_MASK) == TRIGGER_TYPE_INSTEAD) |
#define | TRIGGER_FOR_INSERT(type) ((type) & TRIGGER_TYPE_INSERT) |
#define | TRIGGER_FOR_DELETE(type) ((type) & TRIGGER_TYPE_DELETE) |
#define | TRIGGER_FOR_UPDATE(type) ((type) & TRIGGER_TYPE_UPDATE) |
#define | TRIGGER_FOR_TRUNCATE(type) ((type) & TRIGGER_TYPE_TRUNCATE) |
#define | TRIGGER_TYPE_MATCHES(type, level, timing, event) (((type) & (TRIGGER_TYPE_LEVEL_MASK | TRIGGER_TYPE_TIMING_MASK | (event))) == ((level) | (timing) | (event))) |
Typedefs | |
typedef FormData_pg_trigger * | Form_pg_trigger |
Functions | |
CATALOG (pg_trigger, 2620) | |
Variables | |
FormData_pg_trigger |
#define Anum_pg_trigger_tgargs 14 |
Definition at line 90 of file pg_trigger.h.
Referenced by CreateTrigger(), pg_get_triggerdef_worker(), and RelationBuildTriggers().
#define Anum_pg_trigger_tgattr 13 |
Definition at line 89 of file pg_trigger.h.
Referenced by CreateTrigger().
#define Anum_pg_trigger_tgconstraint 9 |
Definition at line 85 of file pg_trigger.h.
Referenced by AfterTriggerSetState(), and CreateTrigger().
#define Anum_pg_trigger_tgconstrindid 8 |
Definition at line 84 of file pg_trigger.h.
Referenced by CreateTrigger().
#define Anum_pg_trigger_tgconstrrelid 7 |
Definition at line 83 of file pg_trigger.h.
Referenced by CreateTrigger().
#define Anum_pg_trigger_tgdeferrable 10 |
Definition at line 86 of file pg_trigger.h.
Referenced by CreateTrigger().
#define Anum_pg_trigger_tgenabled 5 |
Definition at line 81 of file pg_trigger.h.
Referenced by CreateTrigger().
#define Anum_pg_trigger_tgfoid 3 |
Definition at line 79 of file pg_trigger.h.
Referenced by CreateTrigger().
#define Anum_pg_trigger_tginitdeferred 11 |
Definition at line 87 of file pg_trigger.h.
Referenced by CreateTrigger().
#define Anum_pg_trigger_tgisinternal 6 |
Definition at line 82 of file pg_trigger.h.
Referenced by CreateTrigger().
#define Anum_pg_trigger_tgname 2 |
Definition at line 78 of file pg_trigger.h.
Referenced by CreateTrigger(), EnableDisableTrigger(), get_trigger_oid(), and renametrig().
#define Anum_pg_trigger_tgnargs 12 |
Definition at line 88 of file pg_trigger.h.
Referenced by CreateTrigger().
#define Anum_pg_trigger_tgqual 15 |
Definition at line 91 of file pg_trigger.h.
Referenced by CreateTrigger(), pg_get_triggerdef_worker(), and RelationBuildTriggers().
#define Anum_pg_trigger_tgrelid 1 |
Definition at line 77 of file pg_trigger.h.
Referenced by CreateTrigger(), EnableDisableTrigger(), get_trigger_oid(), RelationBuildTriggers(), and renametrig().
#define Anum_pg_trigger_tgtype 4 |
Definition at line 80 of file pg_trigger.h.
Referenced by CreateTrigger().
#define Natts_pg_trigger 15 |
Definition at line 76 of file pg_trigger.h.
#define TRIGGER_CLEAR_TYPE | ( | type | ) | ((type) = 0) |
Definition at line 114 of file pg_trigger.h.
Referenced by CreateTrigger().
#define TRIGGER_FOR_AFTER | ( | type | ) | (((type) & TRIGGER_TYPE_TIMING_MASK) == TRIGGER_TYPE_AFTER) |
Definition at line 128 of file pg_trigger.h.
Referenced by dumpTrigger(), and pg_get_triggerdef_worker().
#define TRIGGER_FOR_BEFORE | ( | type | ) | (((type) & TRIGGER_TYPE_TIMING_MASK) == TRIGGER_TYPE_BEFORE) |
Definition at line 127 of file pg_trigger.h.
Referenced by CreateTrigger(), dumpTrigger(), and pg_get_triggerdef_worker().
#define TRIGGER_FOR_DELETE | ( | type | ) | ((type) & TRIGGER_TYPE_DELETE) |
Definition at line 131 of file pg_trigger.h.
Referenced by CreateTrigger(), dumpTrigger(), and pg_get_triggerdef_worker().
#define TRIGGER_FOR_INSERT | ( | type | ) | ((type) & TRIGGER_TYPE_INSERT) |
Definition at line 130 of file pg_trigger.h.
Referenced by CreateTrigger(), dumpTrigger(), and pg_get_triggerdef_worker().
#define TRIGGER_FOR_INSTEAD | ( | type | ) | (((type) & TRIGGER_TYPE_TIMING_MASK) == TRIGGER_TYPE_INSTEAD) |
Definition at line 129 of file pg_trigger.h.
Referenced by CreateTrigger(), dumpTrigger(), and pg_get_triggerdef_worker().
#define TRIGGER_FOR_ROW | ( | type | ) | ((type) & TRIGGER_TYPE_ROW) |
Definition at line 126 of file pg_trigger.h.
Referenced by CreateTrigger(), dumpTrigger(), and pg_get_triggerdef_worker().
#define TRIGGER_FOR_TRUNCATE | ( | type | ) | ((type) & TRIGGER_TYPE_TRUNCATE) |
Definition at line 133 of file pg_trigger.h.
Referenced by CreateTrigger(), dumpTrigger(), and pg_get_triggerdef_worker().
#define TRIGGER_FOR_UPDATE | ( | type | ) | ((type) & TRIGGER_TYPE_UPDATE) |
Definition at line 132 of file pg_trigger.h.
Referenced by dumpTrigger(), and pg_get_triggerdef_worker().
#define TRIGGER_SETT_AFTER | ( | type | ) | ((type) |= TRIGGER_TYPE_AFTER) |
Definition at line 119 of file pg_trigger.h.
#define TRIGGER_SETT_BEFORE | ( | type | ) | ((type) |= TRIGGER_TYPE_BEFORE) |
Definition at line 118 of file pg_trigger.h.
#define TRIGGER_SETT_DELETE | ( | type | ) | ((type) |= TRIGGER_TYPE_DELETE) |
Definition at line 122 of file pg_trigger.h.
#define TRIGGER_SETT_INSERT | ( | type | ) | ((type) |= TRIGGER_TYPE_INSERT) |
Definition at line 121 of file pg_trigger.h.
#define TRIGGER_SETT_INSTEAD | ( | type | ) | ((type) |= TRIGGER_TYPE_INSTEAD) |
Definition at line 120 of file pg_trigger.h.
#define TRIGGER_SETT_ROW | ( | type | ) | ((type) |= TRIGGER_TYPE_ROW) |
Definition at line 116 of file pg_trigger.h.
Referenced by CreateTrigger().
#define TRIGGER_SETT_STATEMENT | ( | type | ) | ((type) |= TRIGGER_TYPE_STATEMENT) |
Definition at line 117 of file pg_trigger.h.
#define TRIGGER_SETT_TRUNCATE | ( | type | ) | ((type) |= TRIGGER_TYPE_TRUNCATE) |
Definition at line 124 of file pg_trigger.h.
#define TRIGGER_SETT_UPDATE | ( | type | ) | ((type) |= TRIGGER_TYPE_UPDATE) |
Definition at line 123 of file pg_trigger.h.
#define TRIGGER_TYPE_AFTER 0 |
Definition at line 108 of file pg_trigger.h.
Referenced by AfterTriggerSaveEvent(), CreateTrigger(), and SetTriggerFlags().
#define TRIGGER_TYPE_BEFORE (1 << 1) |
Definition at line 95 of file pg_trigger.h.
Referenced by CreateTrigger(), ExecBRDeleteTriggers(), ExecBRInsertTriggers(), ExecBRUpdateTriggers(), ExecBSDeleteTriggers(), ExecBSInsertTriggers(), ExecBSTruncateTriggers(), ExecBSUpdateTriggers(), and SetTriggerFlags().
#define TRIGGER_TYPE_DELETE (1 << 3) |
Definition at line 97 of file pg_trigger.h.
Referenced by ExecBRDeleteTriggers(), ExecBSDeleteTriggers(), ExecIRDeleteTriggers(), and SetTriggerFlags().
#define TRIGGER_TYPE_EVENT_MASK (TRIGGER_TYPE_INSERT | TRIGGER_TYPE_DELETE | TRIGGER_TYPE_UPDATE | TRIGGER_TYPE_TRUNCATE) |
Definition at line 110 of file pg_trigger.h.
#define TRIGGER_TYPE_INSERT (1 << 2) |
Definition at line 96 of file pg_trigger.h.
Referenced by ExecBRInsertTriggers(), ExecBSInsertTriggers(), ExecIRInsertTriggers(), index_constraint_create(), and SetTriggerFlags().
#define TRIGGER_TYPE_INSTEAD (1 << 6) |
Definition at line 100 of file pg_trigger.h.
Referenced by CreateTrigger(), ExecIRDeleteTriggers(), ExecIRInsertTriggers(), ExecIRUpdateTriggers(), and SetTriggerFlags().
#define TRIGGER_TYPE_LEVEL_MASK (TRIGGER_TYPE_ROW) |
Definition at line 102 of file pg_trigger.h.
#define TRIGGER_TYPE_MATCHES | ( | type, | ||
level, | ||||
timing, | ||||
event | ||||
) | (((type) & (TRIGGER_TYPE_LEVEL_MASK | TRIGGER_TYPE_TIMING_MASK | (event))) == ((level) | (timing) | (event))) |
Definition at line 142 of file pg_trigger.h.
Referenced by AfterTriggerSaveEvent(), ExecBRDeleteTriggers(), ExecBRInsertTriggers(), ExecBRUpdateTriggers(), ExecBSDeleteTriggers(), ExecBSInsertTriggers(), ExecBSTruncateTriggers(), ExecBSUpdateTriggers(), ExecIRDeleteTriggers(), ExecIRInsertTriggers(), ExecIRUpdateTriggers(), and SetTriggerFlags().
#define TRIGGER_TYPE_ROW (1 << 0) |
Definition at line 94 of file pg_trigger.h.
Referenced by AfterTriggerSaveEvent(), ExecBRDeleteTriggers(), ExecBRInsertTriggers(), ExecBRUpdateTriggers(), ExecIRDeleteTriggers(), ExecIRInsertTriggers(), ExecIRUpdateTriggers(), and SetTriggerFlags().
#define TRIGGER_TYPE_STATEMENT 0 |
Definition at line 103 of file pg_trigger.h.
Referenced by ExecBSDeleteTriggers(), ExecBSInsertTriggers(), ExecBSTruncateTriggers(), ExecBSUpdateTriggers(), and SetTriggerFlags().
#define TRIGGER_TYPE_TIMING_MASK (TRIGGER_TYPE_BEFORE | TRIGGER_TYPE_INSTEAD) |
Definition at line 106 of file pg_trigger.h.
#define TRIGGER_TYPE_TRUNCATE (1 << 5) |
Definition at line 99 of file pg_trigger.h.
Referenced by ExecBSTruncateTriggers(), and SetTriggerFlags().
#define TRIGGER_TYPE_UPDATE (1 << 4) |
Definition at line 98 of file pg_trigger.h.
Referenced by ExecBRUpdateTriggers(), ExecBSUpdateTriggers(), ExecIRUpdateTriggers(), and SetTriggerFlags().
#define TriggerRelationId 2620 |
Definition at line 34 of file pg_trigger.h.
Referenced by AfterTriggerSetState(), CreateTrigger(), EnableDisableTrigger(), get_trigger_oid(), getObjectClass(), getObjectDescription(), getObjectIdentity(), pg_get_triggerdef_worker(), RelationBuildTriggers(), RelationCacheInitializePhase3(), RemoveTriggerById(), and renametrig().
typedef FormData_pg_trigger* Form_pg_trigger |
Definition at line 70 of file pg_trigger.h.
CATALOG | ( | pg_trigger | , | |
2620 | ||||
) |
Definition at line 36 of file pg_trigger.h.
{ Oid tgrelid; /* relation trigger is attached to */ NameData tgname; /* trigger's name */ Oid tgfoid; /* OID of function to be called */ int16 tgtype; /* BEFORE/AFTER/INSTEAD, UPDATE/DELETE/INSERT, * ROW/STATEMENT; see below */ char tgenabled; /* trigger's firing configuration WRT * session_replication_role */ bool tgisinternal; /* trigger is system-generated */ Oid tgconstrrelid; /* constraint's FROM table, if any */ Oid tgconstrindid; /* constraint's supporting index, if any */ Oid tgconstraint; /* associated pg_constraint entry, if any */ bool tgdeferrable; /* constraint trigger is deferrable */ bool tginitdeferred; /* constraint trigger is deferred initially */ int16 tgnargs; /* # of extra arguments in tgargs */ /* * Variable-length fields start here, but we allow direct access to * tgattr. Note: tgattr and tgargs must not be null. */ int2vector tgattr; /* column numbers, if trigger is on columns */ #ifdef CATALOG_VARLEN bytea tgargs; /* first\000second\000tgnargs\000 */ pg_node_tree tgqual; /* WHEN expression, or NULL if none */ #endif } FormData_pg_trigger;
Definition at line 63 of file pg_trigger.h.