Search Postgresql Archives

Re: IS as a binary operator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



david wheeler <hippysoyboy@xxxxxxxxx> writes:
> I guess there’s no interest in adding support for `IS` as basically an alias for `IS NOT DISTINCT FROM`? (and `IS NOT` for `IS DISTINCT FROM`)

Seems like it'd be impossibly ambiguous with the various sorts of
"x IS FOO" constructs that SQL keeps adding.  We'd have to make
all the FOO keywords fully reserved, which would break people's
queries for sure.  (Things like CONTENT, DOCUMENT, NORMALIZED,
and NFC are unreserved at the moment; and at least the first
two of those are pretty plausible as user column names.)

Another problem is that currently IS is a type_func_name_keyword,
which makes things like this syntactically valid:

regression=# select is(42);
ERROR:  function is(integer) does not exist

I doubt we could preserve that in the face of what you suggest.
Maybe no one would care, but ...

On the whole, I'm afraid of what sorts of "IS" constructs might
come out of the committee in future, and what sort of hard place
we might find ourselves in if we allow "IS" to not be followed
by one of a small set of known keyword sequences.

It is a shame that there's nothing less verbose than
"IS NOT DISTINCT FROM" for what is surely a pretty common
requirement.  But we probably need to get the SQL committee
on board with any replacement syntax for that.

			regards, tom lane






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux