By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| x | a | b | y | y IS NULL | y IS NOT NULL | y IS DISTINCT FROM NULL |
|---|---|---|---|---|---|---|
| (two) | null | null | null | t | f | f |
| null | null | null | (,) | t | f | t |
| (one) | one | null | (one,) | f | f | t |
| null | null | 1 | (,1) | f | f | t |
| (one) | one | 2 | (one,2) | f | t | t |
SELECT 5