Diggory Blake <diggsey@googlemail.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