Re: Does Type Have = Operator?

From: Euler Taveira <euler(at)timbira(dot)com(dot)br>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "David E(dot) Wheeler" <david(at)justatheory(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Does Type Have = Operator?
Date: 2016-05-11 02:35:41
Message-ID: 57329A7D.1030909@timbira.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 | 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2016-05-11 02:40:23 Re: Reviewing freeze map code
Previous Message Amit Langote 2016-05-11 02:26:23 Re: Declarative partitioning