SYSTRIGGERS System Table

The SYSTRIGGERS table describes the database’s triggers.

The following table shows the contents of the SYSTRIGGERS system table.

SYSTRIGGERS system table
Column Name Type Length Nullable Contents
TRIGGERID CHAR 36 NO Unique identifier for the trigger
TRIGGERNAME VARCHAR 128 NO Name of the trigger
SCHEMAID CHAR 36 NO ID of the trigger's schema (join with SYSSCHEMAS.SCHEMAID)
CREATIONTIMESTAMP TIMESTAMP 29 NO Time the trigger was created
EVENT CHAR 1 NO

Possible values are:

  • 'U' for update
  • 'D' for delete
  • 'I' for insert
FIRINGTIME CHAR 1 NO

Possible values are:

  • 'B' for before
  • 'A' for after
TYPE CHAR 1 NO

Possible values are:

  • 'R' for row
  • 'S' for statement
STATE CHAR 1 NO

Possible values are:

  • 'E' for enabled
  • 'D' for disabled
TABLEID CHAR 36 NO ID of the table on which the trigger is defined
WHENSTMTID CHAR 36 YES Used only if there is a WHEN clause (not yet supported)
ACTIONSTMTID CHAR 36 YES ID of the stored prepared statement for the triggered-SQL-statement (join with SYSSTATEMENTS.STMTID)
REFERENCEDCOLUMNS org.apache.Splice Machine
.catalog.ReferencedColumns

This class is not part of the public API.

-1 YES Descriptor of the columns to be updated, if this trigger is an update trigger (that is, if the EVENT column contains 'U')
TRIGGERDEFINITION LONG VARCHAR 2,147,483,647 YES Text of the action SQL statement
REFERENCINGOLD BOOLEAN 1 YES Whether or not the OLDREFERENCINGNAME, if non-null, refers to the OLD row or table
REFERENCINGNEW BOOLEAN 1 YES Whether or not the NEWREFERENCINGNAME, if non-null, refers to the NEW row or table
OLDREFERENCINGNAME VARCHAR 128 YES Pseudoname as set using the REFERENCING OLD AS clause
NEWREFERENCINGNAME VARCHAR 128 YES Pseudoname as set using the REFERENCING NEW AS clause

Any SQL text that is part of a triggered-SQL-statement is compiled and stored in the SYSSTATEMENTS table. ACTIONSTMTID and WHENSTMTID are foreign keys that reference SYSSTATEMENTS.STMTID. The statements for a trigger are always in the same schema as the trigger.