PostgreSQL Source Code git master
Loading...
Searching...
No Matches
pg_trigger.h File Reference
#include "catalog/genbki.h"
#include "catalog/pg_trigger_d.h"
Include dependency graph for pg_trigger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

BEGIN_CATALOG_STRUCT CATALOG (pg_trigger, 2620, TriggerRelationId)
 
 DECLARE_TOAST (pg_trigger, 2336, 2337)
 
 DECLARE_INDEX (pg_trigger_tgconstraint_index, 2699, TriggerConstraintIndexId, pg_trigger, btree(tgconstraint oid_ops))
 
 DECLARE_UNIQUE_INDEX (pg_trigger_tgrelid_tgname_index, 2701, TriggerRelidNameIndexId, pg_trigger, btree(tgrelid oid_ops, tgname name_ops))
 
 DECLARE_UNIQUE_INDEX_PKEY (pg_trigger_oid_index, 2702, TriggerOidIndexId, pg_trigger, btree(oid oid_ops))
 
 DECLARE_ARRAY_FOREIGN_KEY ((tgrelid, tgattr), pg_attribute,(attrelid, attnum))
 

Variables

END_CATALOG_STRUCT typedef FormData_pg_triggerForm_pg_trigger
 
 FormData_pg_trigger
 

Function Documentation

◆ CATALOG()

BEGIN_CATALOG_STRUCT CATALOG ( pg_trigger  ,
2620  ,
TriggerRelationId   
)

Definition at line 36 of file pg_trigger.h.

37{
38 Oid oid; /* oid */
39 Oid tgrelid BKI_LOOKUP(pg_class); /* relation trigger is
40 * attached to */
41 Oid tgparentid BKI_LOOKUP_OPT(pg_trigger); /* OID of parent
42 * trigger, if any */
43 NameData tgname; /* trigger's name */
44 Oid tgfoid BKI_LOOKUP(pg_proc); /* OID of function to be called */
45 int16 tgtype; /* BEFORE/AFTER/INSTEAD, UPDATE/DELETE/INSERT,
46 * ROW/STATEMENT; see below */
47 char tgenabled; /* trigger's firing configuration WRT
48 * session_replication_role */
49 bool tgisinternal; /* trigger is system-generated */
50 Oid tgconstrrelid BKI_LOOKUP_OPT(pg_class); /* constraint's FROM
51 * table, if any */
52 Oid tgconstrindid BKI_LOOKUP_OPT(pg_class); /* constraint's
53 * supporting index, if
54 * any */
55 Oid tgconstraint BKI_LOOKUP_OPT(pg_constraint); /* associated
56 * pg_constraint entry,
57 * if any */
58 bool tgdeferrable; /* constraint trigger is deferrable */
59 bool tginitdeferred; /* constraint trigger is deferred initially */
60 int16 tgnargs; /* # of extra arguments in tgargs */
61
62 /*
63 * Variable-length fields start here, but we allow direct access to
64 * tgattr. Note: tgattr and tgargs must not be null.
65 */
66 int2vector tgattr BKI_FORCE_NOT_NULL; /* column numbers, if trigger is
67 * on columns */
68
69#ifdef CATALOG_VARLEN
70 bytea tgargs BKI_FORCE_NOT_NULL; /* first\000second\000tgnargs\000 */
71 pg_node_tree tgqual; /* WHEN expression, or NULL if none */
72 NameData tgoldtable; /* old transition table, or NULL if none */
73 NameData tgnewtable; /* new transition table, or NULL if none */
74#endif
int16_t int16
Definition c.h:553
#define BKI_LOOKUP(catalog)
Definition genbki.h:65
#define BKI_LOOKUP_OPT(catalog)
Definition genbki.h:66
#define BKI_FORCE_NOT_NULL
Definition genbki.h:52
FormData_pg_trigger
Definition pg_trigger.h:75
unsigned int Oid
static int fb(int x)
Definition c.h:772
Definition c.h:718

References BKI_FORCE_NOT_NULL, BKI_LOOKUP, BKI_LOOKUP_OPT, and fb().

◆ DECLARE_ARRAY_FOREIGN_KEY()

DECLARE_ARRAY_FOREIGN_KEY ( (tgrelid, tgattr)  ,
pg_attribute  ,
(attrelid, attnum  
)

◆ DECLARE_INDEX()

DECLARE_INDEX ( pg_trigger_tgconstraint_index  ,
2699  ,
TriggerConstraintIndexId  ,
pg_trigger  ,
btree(tgconstraint oid_ops  
)

◆ DECLARE_TOAST()

DECLARE_TOAST ( pg_trigger  ,
2336  ,
2337   
)

◆ DECLARE_UNIQUE_INDEX()

DECLARE_UNIQUE_INDEX ( pg_trigger_tgrelid_tgname_index  ,
2701  ,
TriggerRelidNameIndexId  ,
pg_trigger  ,
btree(tgrelid oid_ops, tgname name_ops  
)

◆ DECLARE_UNIQUE_INDEX_PKEY()

DECLARE_UNIQUE_INDEX_PKEY ( pg_trigger_oid_index  ,
2702  ,
TriggerOidIndexId  ,
pg_trigger  ,
btree(oid oid_ops  
)

Variable Documentation

◆ Form_pg_trigger

◆ FormData_pg_trigger

FormData_pg_trigger

Definition at line 75 of file pg_trigger.h.