handling of COUNT(record) vs IS NULL

Поиск
Список
Период
Сортировка
Искать
От
Sam Mason
Тема
handling of COUNT(record) vs IS NULL
Дата
Msg-id
20080128155943.GR18990@frubble.xen.chris-lamb.co.uk
Список
Дерево обсуждения
handling of COUNT(record) vs IS NULL Sam Mason <sam@samason.me.uk>
Re: handling of COUNT(record) vs IS NULL Tom Lane <tgl@sss.pgh.pa.us>
Re: handling of COUNT(record) vs IS NULL Sam Mason <sam@samason.me.uk>
Re: handling of COUNT(record) vs IS NULL Gregory Stark <stark@enterprisedb.com>
Hi,

I've just noticed that the handling of COUNT(record) and (record IS
NULL) aren't consistent with my understanding of them.  If I run the
following query:

  SELECT
     NULL       IS NULL, COUNT( NULL      ),
    (NULL,NULL) IS NULL, COUNT((NULL,NULL));

The IS NULL checks both return TRUE as I'd expect them to, but the
second count doesn't return 0.

The Comparison Operator docs[1] describe the behaviour of IS NULL
changing, with respect to records, in version 8.2.  Is count still
exhibiting the old behaviour?


  Sam

 [1] http://www.postgresql.org/docs/8.2/static/functions-comparison.html
В списке pgsql-general по дате отправления
От: Gregory Stark
Дата:
От: Jan Sunavec
Дата:
Сообщение: Tsearch2 slovak UTF-8
FAQ