12.13NEW

Record with the inserted or updated values of a row

Available inPSQL — triggers only, DSQL — RETURNING clause of UPDATE, UPDATE OR INSERT and MERGE

TypeRecord type

Syntax

  |NEW.column_name

Table 12.5NEW Parameters
ParameterDescription

column_name

Column name to access

NEW contains the new version of a database record that has just been inserted or updated. NEW is read-only in AFTER triggers.

In multi-action triggers NEW is always available. However, if the trigger is fired by a DELETE, there will be no new version of the record. In that situation, reading from NEW will always return NULL; writing to it will cause a runtime exception.