Re: 8.1 Unique Index Issue/Bug???
От | Rodrigo De Leon |
---|---|
Тема | Re: 8.1 Unique Index Issue/Bug??? |
Дата | |
Msg-id | a55915760607130932w47277ce0p397b6af896bfc36c@mail.gmail.com обсуждение исходный текст |
Ответ на | 8.1 Unique Index Issue/Bug??? ("Chris Hoover" <revoohc@gmail.com>) |
Ответы |
Re: 8.1 Unique Index Issue/Bug???
|
Список | pgsql-admin |
On 7/13/06, Chris Hoover <revoohc@gmail.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
В списке pgsql-admin по дате отправления: