Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'

From: Andres Freund <andres(at)anarazel(dot)de>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, Eugen Konkov <kes-kes(at)yandex(dot)ru>, David Fetter <david(at)fetter(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'
Date: 2019-10-28 15:38:09
Message-ID: 20191028153809.6nhm2xkzq3ifryty@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2019-10-28 10:41:31 -0400, Robert Haas wrote:
> I mean, do we have to break the extensions? If we just added ==
> operators that behaved like IS NOT DISTINCT FROM to each datatype, why
> would anything get broken? I mean, if someone out there has a
> ==(int4,int4) operator, that would get broken, but what's the evidence
> that any such thing exists, or that its semantics are any different
> from what we're talking about?
>
> If we added == as a magic parser shortcut for IS NOT DISTINCT FROM,
> that would be more likely to break things, because it would affect
> every conceivable data type. I don't think that's a great idea, but

Without some magic, the amount of repetitive changes, the likelihood of
inconsistencies, and the reduced information about semantic meaning to
the planner (it'd not be a btree op anymore!), all seem to argue against
adding such an operator.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-10-28 15:41:38 Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'
Previous Message Vik Fearing 2019-10-28 15:36:09 Re: WIP: System Versioned Temporal Table