On 10-05-2016 22:28, David G. Johnston wrote:
> Technically "is not distinct from" would be more correct.
>
Ooops. Fat fingered the statement. Also, forgot to consider null case.
euler=# \pset null 'NULL'
Null display is "NULL".
euler=# select x.a, y.b, x.a IS NOT DISTINCT FROM y.b AS "INDF", x.a =
y.b AS "=" FROM (VALUES (3), (6), (NULL)) AS x (a), (VALUES (3), (6),
(NULL)) AS y (b); a | b | INDF | =
------+------+------+------ 3 | 3 | t | t 3 | 6 | f | f 3 | NULL | f | NULL 6 | 3 | f | f
6 | 6 | t | t 6 | NULL | f | NULLNULL | 3 | f | NULLNULL | 6 | f | NULLNULL | NULL | t |
NULL
(9 rows)
-- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento,
Suporte24x7 e Treinamento