System Catalogs / System catalogs
pg_trigger
Read the PG 18 manualThe catalog pg_trigger stores triggers on tables and views.
Reading PG 18current·documented in 24 of 24 versions, 7.4 to 20
- Kind
- System catalogs
- Columns in this snapshot
- 19
- Definition source
- English manual
- Metadata snapshot
- 18.6
Columns 19
As listed in the PostgreSQL 18 manual.
| Column | Type | Description / reference |
|---|---|---|
oid | oidNOT NULL | Row identifier |
tgrelid | oidNOT NULL | The table this trigger is on pg_class.oid |
tgparentid | oidNOT NULL | Parent trigger that this trigger is cloned from (this happens when partitions are created or attached to a partitioned table); zero if not a clone pg_trigger.oid |
tgname | nameNOT NULL | Trigger name (must be unique among triggers of same table) |
tgfoid | oidNOT NULL | The function to be called pg_proc.oid |
tgtype | int2NOT NULL | Bit mask identifying trigger firing conditions |
tgenabled | charNOT NULL | Controls in which session_replication_role modes the trigger fires. O = trigger fires in “origin” and “local” modes, D = trigger is disabled, R = trigger fires in “replica” mode, A = trigger fires always. |
tgisinternal | boolNOT NULL | True if trigger is internally generated (usually, to enforce the constraint identified by tgconstraint) |
tgconstrrelid | oidNOT NULL | The table referenced by a referential integrity constraint (zero if trigger is not for a referential integrity constraint) pg_class.oid |
tgconstrindid | oidNOT NULL | The index supporting a unique, primary key, referential integrity, or exclusion constraint (zero if trigger is not for one of these types of constraint) pg_class.oid |
tgconstraint | oidNOT NULL | The pg_constraint entry associated with the trigger (zero if trigger is not for a constraint) pg_constraint.oid |
tgdeferrable | boolNOT NULL | True if constraint trigger is deferrable |
tginitdeferred | boolNOT NULL | True if constraint trigger is initially deferred |
tgnargs | int2NOT NULL | Number of argument strings passed to trigger function |
tgattr | int2vectorNOT NULL | Column numbers, if trigger is column-specific; otherwise an empty array pg_attribute.attnum |
tgargs | byteaNOT NULL | Argument strings to pass to trigger, each NULL-terminated |
tgqual | pg_node_tree | Expression tree (in nodeToString() representation) for the trigger's WHEN condition, or null if none |
tgoldtable | name | REFERENCING clause name for OLD TABLE, or null if none |
tgnewtable | name | REFERENCING clause name for NEW TABLE, or null if none |
Column history across versions
Version history 12
Definition snapshot: english-manuals:53285c9d4f235a075a5b4dea0d9… · English manual source