Keith Parks <emkxp01@mtcc.demon.co.uk> writes:
> Then I tried inserting a NULL into the table, which the
> case statement then treated as 0 and not null.
This is a bug: the test expressions i < 0 etc are actually returning
NULL, but ExecEvalCase is failing to check for a NULL condition result.
It should treat a NULL as false, I expect, just as WHERE does.
regards, tom lane