Re: BUG #6669: unique index w/ multiple columns and NULLs - Mailing list pgsql-bugs

From Jeff Davis
Subject Re: BUG #6669: unique index w/ multiple columns and NULLs
Date
Msg-id 1338845461.27297.21.camel@sussancws0025
Whole thread Raw
In response to Re: BUG #6669: unique index w/ multiple columns and NULLs  (Bruce Momjian <bruce@momjian.us>)
Responses Re: BUG #6669: unique index w/ multiple columns and NULLs
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Calling xlst_process with certain arguments causes server crash
Next
From: Peter Eisentraut
Date:
Subject: Re: BUG #6672: Memory leaks in dumputils.c