PostgreSQL
51.56. pg_trigger
The catalog pg_trigger
stores triggers on tables and views. See CREATE TRIGGER for more information.
Table 51.56. pg_trigger
Columns
Column Type Description |
---|
Row identifier |
The table this trigger is on |
Parent trigger that this trigger is cloned from, zero if not a clone; this happens when partitions are created or attached to a partitioned table. |
Trigger name (must be unique among triggers of same table) |
The function to be called |
Bit mask identifying trigger firing conditions |
Controls in which session_replication_role modes the trigger fires. |
True if trigger is internally generated (usually, to enforce the constraint identified by |
The table referenced by a referential integrity constraint |
The index supporting a unique, primary key, referential integrity, or exclusion constraint |
The |
True if constraint trigger is deferrable |
True if constraint trigger is initially deferred |
Number of argument strings passed to trigger function |
Column numbers, if trigger is column-specific; otherwise an empty array |
Argument strings to pass to trigger, each NULL-terminated |
Expression tree (in |
|
|
+
Currently, column-specific triggering is supported only for UPDATE
events, and so tgattr
is relevant only for that event type. tgtype
might contain bits for other event types as well, but those are presumed to be table-wide regardless of what is in tgattr
.
Note
When tgconstraint
is nonzero, tgconstrrelid
, tgconstrindid
, tgdeferrable
, and tginitdeferred
are largely redundant with the referenced pg_constraint
entry. However, it is possible for a non-deferrable trigger to be associated with a deferrable constraint: foreign key constraints can have some deferrable and some non-deferrable triggers.
Submit correction
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.
Copyright © 1996-2023 The PostgreSQL Global Development Group