12.15OLD

Record with the initial values of a row before update or delete

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

TypeRecord type

Syntax

  |OLD.column_name

Table 12.6OLD Parameters
ParameterDescription

column_name

Column name to access

OLD contains the existing version of a database record just before a deletion or update. The OLD record is read-only.

In multi-action triggers OLD is always available. However, if the trigger is fired by an INSERT, there is obviously no pre-existing version of the record. In that situation, reading from OLD will always return NULL.