Supported Versions: Current (17) / 16 / 15 / 14 / 13
Development Versions: devel
Unsupported versions: 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 / 8.0 / 7.4 / 7.3 / 7.2
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

42.32. pg_trigger

The catalog pg_trigger stores triggers on tables. See CREATE TRIGGER for more information.

Table 42-32. pg_trigger Columns

Name Type References Description
tgrelid oid pg_class.oid The table this trigger is on
tgname name   Trigger name (must be unique among triggers of same table)
tgfoid oid pg_proc.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 pg_class.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

Note: pg_class.reltriggers needs to agree with the number of triggers found in this table for the given relation.