Search Postgresql Archives

handling of COUNT(record) vs IS NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux