Darryl Dixon <darryl.dixon@gmail.com> writes: > The bug is that: > 1) The concatenation is not producing NULL, but rather Text, and yet the > comparison fails regardless, and > 2) The explicit CAST of NULL -> Text fails to remedy this.
I wonder what you think NULL means. You certainly don't appear to understand its semantics at all. Every SQL data type allows NULL as a value, so "casting NULL to text" doesn't change the value, only what type the parser deems it to have.