On Mon, Dec 12, 2005 at 01:38:37PM +0000, Micha Szelg wrote:
> Description: NULL=NULL is false
No, the result is NULL, not false. See "Comparison Operators" in
"Do not write expression = NULL because NULL is not 'equal to' NULL.
(The null value represents an unknown value, and it is not known
whether two unknown values are equal.)"
You could change the behavior with the transform_null_equals
configuration setting, but as the documentation says, "this option
is not a general fix for bad programming." It would be better to
use standard-conforming expressions such as IS DISTINCT FROM (standard
since SQL:1999, as I recall).
test=> SELECT NULL = NULL;
test=> SELECT NULL IS DISTINCT FROM NULL;
In response to
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2005-12-14 04:07:25|
|Subject: Re: BUG #2111: Error parsing 'infinity' under some versions of glibc |
|Previous:||From: Jim Dew||Date: 2005-12-13 23:46:53|
|Subject: BUG #2112: query kills db thread|