The RDB$TRIGGERS system table describes the definition of a trigger. The following table provides information on the columns of the RDB$TRIGGERS system table. Data Column Name Type Summary Description RDB$DESCRIPTION list A user-supplied text string of byte describing the trigger. varying RDB$FLAGS integer Flags. RDB$RELATION_NAME char(31) The name of the table for which this trigger is defined. The trigger may be selected on an update to the named table (qualified by the columns described in the RDB$TRIGGER_FIELD_NAME_ LIST). This table is used as a subject table for all contexts that refer to it. RDB$TRIGGER_ACTIONS list A text string containing of byte all the sets of triggered varying actions defined for this trigger. The string consists of one or more sets of clumplets, one set for each triggered action. RDB$TRIGGER_CONTEXTS integer The context number used within the triggered action BLR to map the triggered action BLR to the current context of the triggering update statement. RDB$TRIGGER_FIELD_NAME_ list A text string composed of LIST of byte a count field and one or varying more counted strings. The count is an unsigned word that represents the number of strings in the list. The counted strings are ASCIC names that represent column names. If the trigger is of event type UPDATE, it will be evaluated if one or more of the specified columns has been modified. RDB$TRIGGER_NAME char(31) The name of a trigger. This name must be a unique trigger name within the database. RDB$TRIGGER_NEW_CONTEXT integer A context number used within the triggered action's BLR to refer to the new row values for the subject table for an UPDATE event. RDB$TRIGGER_OLD_CONTEXT integer A context number used within the triggered action's BLR to refer to the old row values of the subject table that existed before an UPDATE event. RDB$TRIGGER_SOURCE list An optional text string for of byte the trigger definition. The varying string is not used by the database system. It should reflect the full definition of the trigger. This column is used by the interfaces to display the trigger definition. RDB$TRIGGER_TYPE integer The type of trigger, as defined by the combination of the trigger action time and the trigger event. Action times are BEFORE and AFTER, and events are INSERT, DELETE, and UPDATE. The values that represent the type of trigger are shown in the TRIGGER_TYPE_ VAL Help topic. RDB$SECURITY_CLASS char(20) Reserved for future use. RDB$CREATED date vms Set when the trigger is created. RDB$LAST_ALTERED date vms Set when SQL ALTER TRIGGER statement is used. RDB$TRIGGER_CREATOR char(31) Creator of this trigger. RDB$EXTENSION_PARAMETERS list Extension parameters. of byte varying
1 – RDB$FLAGS
Represents flags for RDB$TRIGGERS system table. Bit Position Description 0 Trigger is currently disabled. 1 Invalid due to changed schema. 2 Referenced table was altered.
2 – TRIGGER_TYPE_VAL
The following table lists the values for the RDB$TRIGGER_TYPE column of the RDB$TRIGGERS system table and the different types of triggers they represent. Numeric Value Symbolic Value Description 1 RDB$K_BEFORE_STORE Trigger is evaluated before an INSERT. 2 RDB$K_BEFORE_ERASE Trigger is evaluated before a DELETE. 3 RDB$K_BEFORE_MODIFY Trigger is evaluated before an UPDATE. 4 RDB$K_AFTER_STORE Trigger is evaluated after an INSERT. 5 RDB$K_AFTER_ERASE Trigger is evaluated after a DELETE. 6 RDB$K_AFTER_MODIFY Trigger is evaluated after an UPDATE.