Introduction
Sometimes you want to compare two values and treat NULLs as real values, not unknowns. IS DISTINCT FROM helps you do that safely.
You want to check if two columns have different values, including when one or both are NULL.
You need to filter rows where a value changed, even if the old or new value is NULL.
You want to avoid confusing results when comparing NULLs with = or <> operators.
You are writing queries that must treat NULL as a real value for comparison.
You want to find rows where two fields are not the same, counting NULLs as different.