Skip site navigation (1) Skip section navigation (2)

Re: BUG #3276: unique index/unique constraint

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "michael" <miblogic(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3276: unique index/unique constraint
Date: 2007-05-14 13:25:21
Message-ID: 9288.1179149121@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"michael" <miblogic(at)yahoo(dot)com> writes:
> with regards to unique rows, i think we should deviate from the sql
> standard.

That's not happening.

> or if this isn't possible, we should at least document this in
> postgresql's unique index/unique constraint's gotchas, make more obvious. 

It is documented ... you just quoted the docs.

> i'm really surprised that two rows with equal values is allowed

It is not the case that "NULL = NULL", so why would you think that the
two rows are equal?

You probably need to rethink what you are using NULL for in this table.
It's really only good for cases where you mean to indicate that a value
is unknown.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: jeffrey zhaoDate: 2007-05-14 16:02:42
Subject: BUG #3278: PSQLException when using setBinaryStream via JDBC
Previous:From: Laurent FAILLIEDate: 2007-05-14 12:00:29
Subject: RE : Re: BUG #3271: PREPARE/EXCUTE don't work

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group