PostgreSQL Source Code  git master
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.

Typedefs

typedef FormData_pg_triggerForm_pg_trigger
 

Functions

 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

 FormData_pg_trigger
 

Typedef Documentation

◆ Form_pg_trigger

Definition at line 80 of file pg_trigger.h.

Function Documentation

◆ CATALOG()

CATALOG ( pg_trigger  ,
2620  ,
TriggerRelationId   
)

Definition at line 34 of file pg_trigger.h.

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

References BKI_FORCE_NOT_NULL, BKI_LOOKUP, and BKI_LOOKUP_OPT.

◆ 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

◆ FormData_pg_trigger

FormData_pg_trigger

Definition at line 73 of file pg_trigger.h.