Alright, I am certain now that this is intended.
The reason is that Dan had already pointed out a very similar issue offline (almost exactly a year ago Dan...) and after much hair splitting we had come to the conclusion that while Manifold 9 might be being pedantic, it was correct.
But re-reading my comments from that discussion with Dan, I notice there is something wrong in my second post above. The second sentence here is wrong:
The result of
x = NULL
is neither TRUE nor FALSE, for any x (including NULL), but rather unknown, represented again by NULL. In that case,
evaluation should pass to ELSE x, which is in this case is also NULL.
Taking the syntax from above again:
CASE x WHEN y THEN z ELSE x END
Let x (or y, or both) be NULL. So the result of the comparison x = y is also NULL, and THEN z is not evaluated (because the case is not TRUE). But is ELSE evaluated? What does ELSE mean in this context? (I know, this is getting tricky. This is where I got to with Dan last year, and couldn't put the question clearly enough to try for an answer.)
After comparing x and y (one or both of which is NULL), we have the result NULL. Now we hit ELSE... but not so fast. Is NULL TRUE? No. Is it FALSE? No. We know what FALSE ELSE TRUE means (it is TRUE). And we know what TRUE ELSE FALSE means (it is TRUE as well, short-circuited in this case). But what does NULL ELSE TRUE mean?
I strongly suspect that NULL ELSE TRUE (and NULL ELSE FALSE) must evaluate to NULL (unknown). Since, if the answer is unknown before the ELSE, how can adding a second possibility (whether TRUE or FALSE) make it any clearer? It can't. It is still unknown.
So in the example above, we never get THEN z (clearly), and we also never get ELSE x, regardless of the value of x (whether NULL or something determinate), because ELSE is never evaluated.
Instead, we get the result of the first comparison, short-circuited. Which is NULL.
A concrete example to make it clearer:
CASE 1 WHEN NULL THEN 2 ELSE 3 END
CASE NULL WHEN 1 THEN 2 ELSE 3 END
The result of this expression is not 3, but NULL (the result of 1 = NULL, unknown). ELSE doesn't arise.