Re: Does Type Have = Operator? - Mailing list pgsql-hackers

From Euler Taveira
Subject Re: Does Type Have = Operator?
Date
Msg-id 57329A7D.1030909@timbira.com.br
Whole thread Raw
In response to Re: Does Type Have = Operator?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
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
 



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Declarative partitioning
Next
From: Masahiko Sawada
Date:
Subject: Re: Reviewing freeze map code