Re: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Stand ards - Mailing list pgsql-hackers

From Tom Lane
Subject Re: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Stand ards
Date
Msg-id 7580.992889201@sss.pgh.pa.us
Whole thread Raw
In response to Re: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Stand ards  ("Joe Conway" <joseph.conway@home.com>)
List pgsql-hackers
"Joe Conway" <joseph.conway@home.com> writes:
> Attached is a patch for a new NullTest node type for review and comment.

I assume you are just looking for review at this point; I would not
recommend applying to CVS until the BooleanTest part is done too.
(Since parsetree changes affect stored rules, the change really should
include a catversion.h increment, and thus it's best to bunch this sort
of change together to avoid forcing extra initdbs on other hackers.)
I'll look through the code later, but...

> Based on this, should support for the converting "a = null" to "a is null"
> be dropped?

My opinion on that is already on record ;-)

> 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?

Curious; I'd have said that that is clearly within the spec.  Can anyone
check it on some other engines?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: [SQL] LEFT JOIN ...
Next
From: Ryan Mahoney
Date:
Subject: Re: POSTMASTER