The catalog pg_trigger
stores triggers on tables.
See CREATE TRIGGER
for more information.
Table 43.33. pg_trigger
Columns
Name | Type | References | Description |
---|---|---|---|
tgrelid |
oid |
|
The table this trigger is on |
tgname |
name |
Trigger name (must be unique among triggers of same table) | |
tgfoid |
oid |
|
The function to be called |
tgtype |
int2 |
Bit mask identifying trigger conditions | |
tgenabled |
bool |
True if trigger is enabled | |
tgisconstraint |
bool |
True if trigger implements a referential integrity constraint | |
tgconstrname |
name |
Referential integrity constraint name | |
tgconstrrelid |
oid |
|
The table referenced by an referential integrity constraint |
tgdeferrable |
bool |
True if deferrable | |
tginitdeferred |
bool |
True if initially deferred | |
tgnargs |
int2 |
Number of argument strings passed to trigger function | |
tgattr |
int2vector |
Currently unused | |
tgargs |
bytea |
Argument strings to pass to trigger, each NULL-terminated |
pg_class.reltriggers
needs to agree with the
number of triggers found in this table for the given relation.