| От | Michael Fuhr |
|---|---|
| Тема | Re: BUG #2975: UNIQUE INDEX doesn't work |
| Дата | |
| Msg-id | 20070214144809.GA16753@winnie.fuhr.org обсуждение |
| Ответ на | BUG #2975: UNIQUE INDEX doesn't work ("Steven" <s.lambert@madeware.nl>) |
| Список | pgsql-bugs |
On Wed, Feb 14, 2007 at 10:01:58AM +0100, Steven Lambert wrote: > You are right, the index has more columns and one of them have most of the > time the value NULL. > It is the date when the record has been "deleted" See "Unique Constraints" in the documentation, in particular the last paragraph: http://www.postgresql.org/docs/8.1/interactive/ddl-constraints.html#AEN2016 "However, null values are not considered equal in this comparison. That means even in the presence of a unique constraint it is possible to store duplicate rows that contain a null value in at least one of the constrained columns." This has been discussed before; search the archives for words like "null", "unique", and "comparison" or "compare". -- Michael Fuhr
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера