UNIQUE not honoured for NULL

From: David Newall <davidn-postgres(at)rebel(dot)net(dot)au>
To: PostgreSQL bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: UNIQUE not honoured for NULL
Date: 2004-07-06 10:40:51
Message-ID: 1089110449.5002.16.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PostgreSQL version: 7.4.3 (RPMs from ftp.au.postgresql.org)

Operating Sysem: Fedora Core 1

CREATE TABLE t(i integer UNIQUE);
INSERT INTO t VALUES (null);
INSERT INTO t VALUES (null);
SELECT coalesce(i,-999) FROM t;
coalesce
----------
-999
-999
(2 rows)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-07-06 13:37:59 Re: [SQL] Immutable function in index
Previous Message David Newall 2004-07-06 09:26:31 Can't join on null values