Inspectopedia
 
2024.3

Suspicious code in triggers

Warning
New
Last modified: 03 December 2024

Reports incorrect usages of transition table variables in triggers.

Example (HSQLDB):

In HSQLDB, DELETE triggers may be used only with the OLD state while INSERT triggers may have only the NEW state. So, in the previous example, NEW in SELECT * FROM NEW; will be highlighted as well as OLD in REFERENCING OLD ROW AS newrow.