"Joe Conway" <[EMAIL PROTECTED]> writes:
> I also noticed that in PostgreSQL I can do the following (both before and
> after this patch):
>     select f2 is null from foo;
> whereas in both Oracle and MSSQL it causes a syntax error. Any thoughts on
> this?

I dug into this further and discovered that indeed it is not SQL92
... but it is SQL99.  Amazingly enough, SQL92 doesn't allow boolean
expressions as a possible type of general expression:

         <value expression> ::=
                <numeric value expression>
              | <string value expression>
              | <datetime value expression>
              | <interval value expression>

It only allows them as <search condition>s, which is to say WHERE,
HAVING, CASE WHEN, CHECK, and one or two other places.

But SQL99 gets it right:

         <value expression> ::=
                <numeric value expression>
              | <string value expression>
              | <datetime value expression>
              | <interval value expression>
              | <boolean value expression>
              | <user-defined type value expression>
              | <row value expression>
              | <reference value expression>
              | <collection value expression>

Looks like we're ahead of the curve here...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to