Re: BUG #7501: Unique index fails to check uniqueness on nulls

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: BUG #7501: Unique index fails to check uniqueness on nulls
Дата
Msg-id 1345740325.16150.3.camel@jdavis
обсуждение исходный текст
Ответ на BUG #7501: Unique index fails to check uniqueness on nulls  (matthew.p.kusnierz@jpmorgan.com)
Список pgsql-bugs
On Thu, 2012-08-23 at 09:38 +0000, matthew.p.kusnierz@jpmorgan.com
wrote:
> Multi-column unique indexes allow duplicate rows to be inserted if any of
> the indexed columns are inserted with a null.

That is mandated in the SQL spec, and is documented here:

"For the purpose of a unique constraint, null values are not considered
equal."

 -- http://www.postgresql.org/docs/9.2/static/sql-createtable.html

NULLs can be confusing, I know.

Regards,
    Jeff Davis

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #7502: ALTER COLUMN TYPE processed even if column type matches
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #7502: ALTER COLUMN TYPE processed even if column type matches