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    | NULL
 NULL |    3 | f    | NULL
 NULL |    6 | f    | NULL
 NULL | NULL | t    | NULL
(9 rows)


-- 
   Euler Taveira                   Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to