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
обсуждение исходный текст
Ответы Re: handling of COUNT(record) vs IS NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
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
Дата:
Сообщение: Re: A select DISTINCT query? - followup Q
Следующее
От: "Jan Sunavec"
Дата:
Сообщение: Tsearch2 slovak UTF-8