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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: Eugen Konkov <kes-kes(at)yandex(dot)ru>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'
Date: 2019-10-26 16:48:27
Message-ID: 31163.1572108507@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Fetter <david(at)fetter(dot)org> writes:
> On Sat, Oct 26, 2019 at 06:41:10PM +0300, Eugen Konkov wrote:
>> I have noticed that it would be cool to use '==' in place of 'IS NOT
>> DISTICT FROM'
>> What do you think about this crazy idea?

> Turning "IS NOT DISTINCT FROM" into an operator sounds like a great
> idea.

No it isn't. For starters, somebody very possibly has used that
operator name in an extension. For another, it'd be really
inconsistent to have an abbreviation for 'IS NOT DISTINCT FROM'
but not 'IS DISTINCT FROM', so you'd need another reserved operator
name for that, making the risk of breakage worse.

There's an independent set of arguments around why we'd invent a
proprietary replacement for perfectly good standard SQL.

We do have some unresolved issues around how to let dump/restore
control the interpretation of IS [NOT] DISTINCT FROM, cf

https://www.postgresql.org/message-id/flat/ffefc172-a487-aa87-a0e7-472bf29735c8%40gmail.com

but I don't think this idea is helping with that at all.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2019-10-26 17:01:55 Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'
Previous Message David Fetter 2019-10-26 16:30:56 Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'