Re: UNIQUE not honoured for NULL - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: UNIQUE not honoured for NULL
Date
Msg-id 200407072125.52871.peter_e@gmx.net
Whole thread Raw
In response to UNIQUE not honoured for NULL  (David Newall <davidn-postgres@rebel.net.au>)
List pgsql-bugs
David Newall wrote:
> 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)

NULL = NULL is not true, so the rows are not equal.

pgsql-bugs by date:

Previous
From: "Dario V. Fassi"
Date:
Subject: Re: [JDBC] Error in DatabaseMetaData.getColumns() with Views
Next
From: Peter Eisentraut
Date:
Subject: Re: Can't join on null values