Updated on 2022-08-16 GMT+08:00

PG_TRIGGER

PG_TRIGGER records the trigger information.

Name

Type

Description

tgrelid

oid

OID of the table where the trigger is located.

tgname

name

Trigger name.

tgfoid

oid

Trigger OID.

tgtype

smallint

Trigger type

tgenabled

"char"

O: The trigger fires in "origin" or "local" mode.

D: The trigger is disabled.

R: The trigger fires in "replica" mode.

A: The trigger always fires.

tgisinternal

boolean

Internal trigger ID. If the value is true, it indicates an internal trigger.

tgconstrrelid

oid

The table referenced by the integrity constraint

tgconstrindid

oid

Index of the integrity constraint

tgconstraint

oid

OID of the constraint trigger in the pg_constraint

tgdeferrable

boolean

The constraint trigger is of the DEFERRABLE type.

tginitdeferred

boolean

whether the trigger is of the INITIALLY DEFERRED type

tgnargs

smallint

Input parameters number of the trigger function

tgattr

int2vector

Column ID specified by the trigger. If no column is specified, an empty array is used.

tgargs

bytea

Parameter transferred to the trigger

tgqual

pg_node_tree

Indicates the WHEN condition of the trigger. If the WHEN condition does not exist, the value is null.