From: Jeff Davis <pgsql@j-davis.com>
To: matthew.p.kusnierz@jpmorgan.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7501: Unique index fails to check uniqueness on nulls
Date: Thu, 23 Aug 2012 09:45:25 -0700
Message-ID: <1345740325.16150.3.camel@jdavis> (raw)
In-Reply-To: <E1T4Tra-0003VA-Lv@wrigleys.postgresql.org>
References: <E1T4Tra-0003VA-Lv@wrigleys.postgresql.org>
On Thu, 2012-08-23 at 09:38 +0000, matthew.p.kusnierz@jpmorgan.com
wrote:
> Multi-column unique indexes allow duplicate rows to be inserted if any of
> the indexed columns are inserted with a null.
That is mandated in the SQL spec, and is documented here:
"For the purpose of a unique constraint, null values are not considered
equal."
-- http://www.postgresql.org/docs/9.2/static/sql-createtable.html
NULLs can be confusing, I know.
Regards,
Jeff Davis
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, matthew.p.kusnierz@jpmorgan.com
Subject: Re: BUG #7501: Unique index fails to check uniqueness on nulls
In-Reply-To: <1345740325.16150.3.camel@jdavis>
References: <E1T4Tra-0003VA-Lv@wrigleys.postgresql.org> <1345740325.16150.3.camel@jdavis>
* 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