Meh, I don't want it THAT badly. I'm just saying that's how it should
have been in the original design of the SQL language. In fact though, it
probably wouldn't have mattered. Every different RDBMS seems to treat
nulls differently in this regard, so I'm not even sure exactly what the
spec says on the issue (most likely, SQLite is exactly in line with the
spec, but I haven't bothered to confirm that.)

For my own use, I'm willing to just be very specific where NULL is
involved. Writing my own query parser to allow me to abuse the language
isn't really worth it to me.

John

-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Darren Duncan
Sent: Wednesday, October 28, 2009 12:09 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Grammar of "X is Y"

John Crenshaw wrote:
> Yeah, I tend to agree that null != null is confusing, however that is
> the way it is "supposed" to behave, so changing that would break a lot
> of code. If I had my way, and the behavior of NULL in operations COULD
> be changed, I would opt for the following:
> 
> NULL = NULL -> true
> As a Boolean, NULL -> false
> (NULL = anything other than NULL) -> NULL
> (NULL {+,-,*,/,>,<} x) -> NULL
> (NULL {AND,OR} x) -> x
> 
> The result would be that expressions with "null" are simply ignored,
> which as far as I can tell is nearly always the goal when you have to
> add "IS NULL" tests to expressions. Of course, a change like this
would
> break TONS of code, so it will never happen, but I can dream.

On the other hand, you could invent another RDBMS programming language
that 
works the way you think SQL should be weren't it for exact backwards 
compatibility, and then just have a translation tool to convert code
written in 
it to the behavior-equivalent SQL/etc code that a DBMS will actually
run.  The 
other language could be arbitrarily similar to SQL when you don't have a
reason 
to be different.  This is what I'm doing with my "Muldis D" language,
which is 
close to being feature-complete. -- Darren Duncan
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to