DISPLAYS_AS()

All functions > COMPARISON > DISPLAYS_AS()

Returns TRUE if two values are not distinct, treating NULL values as comparable.

Signatures

Returns: Null-safe equality / inequality result

DISPLAYS_AS(expr1: T, expr2: T) → BOOLEAN
sql
ParameterTypeRequiredDescription
expr1TYesFirst value
expr2TYesSecond value

Notes

  • Unlike =, NULL is treated as comparable here
  • NULL DISPLAYS AS NULL is TRUE (they are the same)
  • value DISPLAYS AS NULL is FALSE when value is not NULL
  • NULL DISPLAYS AS value is FALSE when value is not NULL
  • Both values must be of the same type (including ARRAY/ROW)
  • Opposite of NOT DISPLAYS AS
  • FeatureQL-native spelling; SQL IS NOT DISTINCT FROM is registered separately so format/querytools match the syntax you used

Related operators

See also

Examples

DISPLAYS_AS — functional call

FeatureQL
SELECT
    f1 := DISPLAYS_AS(1, 1), -- `DISPLAYS_AS(expr1, expr2)` matches keyword `DISPLAYS AS`
    f2 := DISPLAYS_AS(NULL::BIGINT, NULL::BIGINT) -- Both NULL: null-safe equality
;
Result
f1 BOOLEANf2 BOOLEAN
truetrue

DISPLAYS_AS — chained

FeatureQL
SELECT
    f1 := (1).DISPLAYS_AS(1), -- Receiver is the left-hand operand
    f2 := (NULL::BIGINT).DISPLAYS_AS(NULL::BIGINT) -- Same semantics as the prefix call
;
Result
f1 BOOLEANf2 BOOLEAN
truetrue

Last update at: 2026/05/26 17:22:09