Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM' - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'
Date
Msg-id 20191028153809.6nhm2xkzq3ifryty@alap3.anarazel.de
Whole thread Raw
In response to Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'  (Robert Haas <robertmhaas@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: Vik Fearing
Date:
Subject: Re: WIP: System Versioned Temporal Table
Next
From: Tom Lane
Date:
Subject: Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'