pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: 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 14:31:01 -0700
Message-ID: <1338845461.27297.21.camel@sussancws0025> (raw)
In-Reply-To: <20120604155623.GD2352@momjian.us>
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>
	<20120604155623.GD2352@momjian.us>

On Mon, 2012-06-04 at 11:56 -0400, Bruce Momjian wrote:
> I get your point about COUNT(*) really counting rows, not values, but
> why doesn't GROUP BY then skip nulls?

A while ago, I came to the conclusion that applying logic to extrapolate
the behavior of NULL is a bad idea:

http://thoughts.davisjeff.com/2009/08/02/what-is-the-deal-with-nulls/

Jose was not wrong about the inconsistency between UNIQUE and GROUP BY.
But the answer is that "we do it that way because the standard says so".
And that's a good reason.

Regards,
	Jeff Davis





view thread (11+ messages)  latest in thread

Message-ID: <1338845461.27297.21.camel@sussancws0025>
Permalink:  ../1338845461.27297.21.camel@sussancws0025/
Also on:    postgresql.org/message-id/1338845461.27297.21.camel@sussancws0025

 · 

reply

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: pgsql@j-davis.com, bruce@momjian.us, Kevin.Grittner@wicourts.gov, jose.soares@sferacarta.com, tgl@sss.pgh.pa.us
  Subject: Re: BUG #6669: unique index w/ multiple columns and NULLs
  In-Reply-To: <1338845461.27297.21.camel@sussancws0025>
  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> <20120604155623.GD2352@momjian.us> <1338845461.27297.21.camel@sussancws0025>

* 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