RDB$TRIGGERS

From InterBase
Jump to: navigation, search

Go Up to System Tables


RDB$TRIGGERS defines triggers.

RDB$TRIGGERS
Column name Datatype Length Description

RDB$TRIGGER_NAME

CHAR

67

Names the trigger being defined.

RDB$RELATION_NAME

CHAR

67

Name of the table associated with the trigger being defined; this name must exist in RDB$RELATIONS.

RDB$TRIGGER_SEQUENCE

SMALLINT

Sequence number for the trigger being defined; determines when a trigger is executed in relation to others of the same type.

  • Triggers with the same sequence number execute in alphabetic order by trigger name.
  • If this number is not assigned by the user, InterBase assigns a value of 0.

RDB$TRIGGER_TYPE

SMALLINT

The type of trigger being defined.

Values are:

  • 1 - BEFORE INSERT
  • 2 - AFTER INSERT
  • 3 - BEFORE UPDATE
  • 4 - AFTER UPDATE
  • 5 - BEFORE DELETE
  • 6 - AFTER DELETE

RDB$TRIGGER_SOURCE

BLOB

Subtype Text: Original source of the trigger definition; the isql SHOW TRIGGERS statement displays information from this column.

RDB$TRIGGER_BLR

BLOB

Subtype BLR: BLR (Binary Language Representation) of the trigger source.

RDB$DESCRIPTION

BLOB

Subtype Text: User-written description of the trigger being defined; when including a comment in a CREATE TRIGGER or ALTER TRIGGER statement, isql writes to this column.

RDB$TRIGGER_INACTIVE

SMALLINT

Indicates whether the trigger being defined is:

  • Active (value of 0)
  • Inactive (value of 1)

RDB$SYSTEM_FLAG

SMALLINT

Indicates whether the trigger is:

  • User-defined (value of 0)
  • System-defined (value greater than 0)

RDB$FLAGS

SMALLINT

1 = SQL-defined trigger

2 = ignore permission checking

User-defined triggers require that the user executing them have underlying access permission to the objects accessed by the trigger. However, internal, system-defined triggers occasionally need to bypass those permission checks to enforce database integrity.