Help Center > > Developer Guide> System Catalogs and System Views> System Catalogs> PG_TRIGGER

PG_TRIGGER

Updated at:Jul 15, 2020 GMT+08:00

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: Trigger is triggered in origin or local mode.

D: Trigger is disabled.

R: Trigger is triggered in replica mode.

A: The trigger is always triggered.

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.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel