On Jul 23, 2009, at 6:06 PM, Jeff Davis wrote:
> However, in step 2, you transformed:
> x IS NOT NULL => NOT x IS NULL
>
> But in SQL that is not a tautology!
No, that's not the problem I see -- that solved the problem in my
particular code. The problem I see is that, given that the standard
says (according to Tom) that if any value is NULL then the record is
NULL, then I would expect this to return false:
SELECT ROW(1, NULL) IS DISTINCT FROM ROW(2, NULL);
But it returns true.
> I don't think it's wise to assume SQL is consistent. I think it is
> possible to create a consistent 3VL system, but you have to give up
> some
> other very important property. I can't remember the details at the
> moment, but there's an interesting proof in "Logic and Databases" by
> C.J. Date.
If the standard says that, in the case of records, two NULLs are
distinct, then fine. Completely bizarre, but fine. But I suspect that
such is not the case.
Best,
David