Skip to main content
Early access The saturating_add_pos function adds two numbers, saturating at 0 and 2,147,483,647 instead of overflowing.

Arguments

The syntax is:
saturating_add_pos(
  x INT,
  y INT
) RETURNS INT
NameTypeDefaultRequiredDescription
xINT-An integer to add to y
yINT-An integer to add to x

Returns

ColumnTypeDescription
saturating_add_posINTThe result of x + y, saturating at 0 for the minimum bound