From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Diggory Blake <diggsey(at)googlemail(dot)com> |
Cc: | Pavel Stehule <pavel(dot)stehule(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:41:38 |
Message-ID: | 27329.1572277298@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Diggory Blake <diggsey(at)googlemail(dot)com> writes:
> Would it be possible to just use `IS`, `IS NOT` instead of `IS [NOT]
> DISTINCT FROM`? It's always surprised me that you can write `IS NULL`, `IS
> TRUE`, etc. but they're all special-cased. I could see it introducing a
> parsing ambiguity, but it doesn't seem impossible to resolve?
Cute idea, but I'm afraid it breaks down when you come to
"x IS DOCUMENT". We'd have to make DOCUMENT fully reserved
(or at least more reserved --- maybe type_func_name_keyword
would be enough?) or it'd be unclear whether that meant a
not-distinct comparison to a column named "document".
And I'd bet a lot that there are people out there with
columns named "document", so even type_func_name_keyword
reserved-ness would be enough to break their applications.
In the bigger picture, even if we were okay with that, I'm
afraid that we'd constantly be in danger of the SQL committee
adding some new "x IS KEYWORD(s)" test, causing new problems.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2019-10-28 15:47:54 | Re: BUG #16079: Question Regarding the BUG #16064 |
Previous Message | Andres Freund | 2019-10-28 15:38:09 | Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM' |