This page in other versions: 8.4 / 9.0 / 9.1 / 9.2 / 9.3  |  Development versions: devel / 9.4  |  Unsupported versions: 7.2 / 7.3 / 7.4 / 8.0 / 8.1 / 8.2 / 8.3

3.28. pg_trigger

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

Table 3-28. 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   Bitmask identifying trigger conditions
tgenabled bool   True if trigger is enabled (not presently checked everywhere it should be, so disabling a trigger by setting this false does not work reliably)
tgisconstraint bool   True if trigger implements an RI constraint
tgconstrname name   RI constraint name
tgconstrrelid oid pg_class.oid The table referenced by an RI 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 match up with the entries in this table.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group