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

From Andrew Dunstan
Subject Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'
Date
Msg-id 76d333dc-7857-83e7-a97d-5910f93453be@2ndQuadrant.com
Whole thread Raw
In response to Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'
Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'
List pgsql-hackers
On 10/28/19 8:37 AM, Robert Haas wrote:
> On Mon, Oct 28, 2019 at 7:54 AM Isaac Morland <isaac.morland@gmail.com> wrote:
>> Postgres already allows != as a synonym for <>. I think having =! mean something subtly but significantly different
isa terrible idea. At a minimum we would have to remove the synonym, which would be a backwards compatibility break.
 
> I certainly agree with that. I do think, though, that IS DISTINCT FROM
> is a terribly verbose thing to have to write all the time.  It's not
> that bad when you write a query that contains one instance of it, but
> I've both seen and written queries where you need to use it a bunch of
> times, and that can get really annoying. 



How about instead of new operators we just provide a nice shorthand way
of saying these? e.g. ARE and AINT :-)


cheers


andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




pgsql-hackers by date:

Previous
From: Diggory Blake
Date:
Subject: Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'
Next
From: Fabien COELHO
Date:
Subject: Re: pgbench - extend initialization phase control