From: | "Rodrigo De Leon" <rdeleonp(at)gmail(dot)com> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: 8.1 Unique Index Issue/Bug??? |
Date: | 2006-07-13 16:32:10 |
Message-ID: | a55915760607130932w47277ce0p397b6af896bfc36c@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On 7/13/06, Chris Hoover <revoohc(at)gmail(dot)com> wrote:
> On this table, I have created a unique index on payer_trn03, payer_trn04,
> and expire_timestamp. However, since the expire_timestamp is normally null,
> the unique index does not appear to be working. I have been able to enter
> two identical rows into this table.
>
> Why is PostgreSQL not enforcing this index? This appears to be a pretty
> major a bug? It would seem that you could have a unique index across
> columns that might have a null in them.
From:
http://www.postgresql.org/docs/8.1/interactive/indexes-unique.html
Quote:
"When an index is declared unique, multiple table rows with equal
indexed values will not be allowed. Null values are not considered
equal. A multicolumn unique index will only reject cases where all of
the indexed columns are equal in two rows."
Regards,
Rodrigo
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2006-07-13 18:44:42 | Re: 8.1 Unique Index Issue/Bug??? |
Previous Message | Scott Marlowe | 2006-07-13 16:17:26 | Re: 8.1 Unique Index Issue/Bug??? |