From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Bruce Momjian <bruce@momjian.us>
To: jo <jose.soares@sferacarta.com>
Cc: pgsql-bugs@postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: BUG #6669: unique index w/ multiple columns and NULLs
Date: Mon, 04 Jun 2012 10:29:22 -0500
Message-ID: <4FCC8E020200002500048003@gw.wicourts.gov> (raw)
In-Reply-To: <20120604150552.GB2352@momjian.us>
References: <E1SZxsy-0001GO-JW@wrigleys.postgresql.org>
<2870.1338521291@sss.pgh.pa.us>
<4FC86818.4080002@sferacarta.com>
<20120604150552.GB2352@momjian.us>
Bruce Momjian <bruce@momjian.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, bruce@momjian.us, jose.soares@sferacarta.com, tgl@sss.pgh.pa.us
Subject: Re: BUG #6669: unique index w/ multiple columns and NULLs
In-Reply-To: <4FCC8E020200002500048003@gw.wicourts.gov>
References: <E1SZxsy-0001GO-JW@wrigleys.postgresql.org> <2870.1338521291@sss.pgh.pa.us> <4FC86818.4080002@sferacarta.com> <20120604150552.GB2352@momjian.us> <4FCC8E020200002500048003@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox