Re: BUG #6669: unique index w/ multiple columns and NULLs

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>, "jo" <jose(dot)soares(at)sferacarta(dot)com>
Cc: <pgsql-bugs(at)postgresql(dot)org>,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: BUG #6669: unique index w/ multiple columns and NULLs
Date: 2012-06-04 15:29:22
Message-ID: 4FCC8E020200002500048003@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> COUNT(*) can't skip nulls because there is no specified column,
> but why does COUNT(col) skip nulls --- again, inconsistent.

I disagree -- one is counting rows, the other is counting rows with
a value in that column. I guess one could criticize the syntax for
specifying that as non-obvious, but it seems pretty reasonable to
me.

-Kevin

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2012-06-04 15:56:23 Re: BUG #6669: unique index w/ multiple columns and NULLs
Previous Message Bruce Momjian 2012-06-04 15:05:52 Re: BUG #6669: unique index w/ multiple columns and NULLs