Re: WHERE =NULL malfunction in release 7.2
От | Stephan Szabo |
---|---|
Тема | Re: WHERE |
Дата | |
Msg-id | 20020621094717.E98706-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на |
WHERE |
Список | pgsql-bugs |
On Thu, 20 Jun 2002, Ingo Ciechowski wrote: > Unfortunaly there's a (hopefully easy to fix) bug in release 7.2 and > 7.2.1 that was not there in 7.1.3 and caused me to switch back today. Nope. It's a bug fix. > However - if you want to access a <timestamp>=NULL value, it is not found :-(( > > > > i++=# select * from uri where freigegeben=NULL; > template_id | content_id | freigegeben | gueltig_von | gueltig_bis | > queue_status | site_id | uri > -------------+------------+-------------+-------------+-------------+--------------+---------+----- > (0 rows) Which is correct because NULL does not equal NULL. Think of NULL as an unknown value, you don't know if two NULLs are equal. In 7.1, there was a parser hack to allow this due to some older clients that expected it to work. In 7.2, you can turn this on with a variable (TRANSFORM_NULL_EQUALS), however this behavior is contrary to the SQL spec.
В списке pgsql-bugs по дате отправления: