↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Supported versions: Current (18) / 17 / 16 / 15 / 14
Development versions: 19 / 20devel
Unsupported versions: 13 / 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
Historical version. PostgreSQL 7.2 has reached end of support. See the current manual.

3.20. pg_trigger

This system catalog stores triggers on tables. See under CREATE TRIGGER for more information.

Table 3-20. pg_trigger Columns

NameTypeReferencesDescription
tgrelidoidpg_class.oidThe table this trigger is on
tgnamename Trigger name (need not be unique)
tgfoidoidpg_proc.oidThe function to be called
tgtypeint2 Bitmask identifying trigger conditions
tgenabledbool True if trigger is enabled (not presently checked everywhere it should be, so disabling a trigger by setting this false does not work reliably)
tgisconstraintbool True if trigger is a RI constraint
tgconstrnamename RI constraint name
tgconstrrelidoidpg_class.oidThe table referenced by an RI constraint
tgdeferrablebool True if deferrable
tginitdeferredbool True if initially deferred
tgnargsint2 Number of argument strings passed to trigger function
tgattrint2vector Currently unused
tgargsbytea Argument strings to pass to trigger, each null-terminated

Note: pg_class.reltriggers needs to match up with the entries in this table.

Report a documentation issue

Read the upstream documentation. For corrections, first check the current manual.