Re: NULL values seem to short-circuit my unique index

Поиск
Список
Период
Сортировка
От Chris
Тема Re: NULL values seem to short-circuit my unique index
Дата
Msg-id 48E044AF.9040104@gmail.com
обсуждение исходный текст
Ответ на NULL values seem to short-circuit my unique index  (Matthew Wilson <matt@tplus1.com>)
Ответы Re: NULL values seem to short-circuit my unique index  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Список pgsql-general
Matthew Wilson wrote:
> I'm trying to comprehend how NULL values interact with unique indexes.
> It seems like I can insert two rows with NULL values in a column with a
> unique constraint just fine.
>
> Is there something special about NULL?  Can anyone post some links to
> explain what is going on?

When you think of null as "unknown", it makes sense.

Does an unknown value equal another unknown value?

http://www.postgresql.org/docs/8.3/interactive/functions-logical.html

http://www.postgresql.org/docs/8.3/interactive/functions-comparison.html

--
Postgresql & php tutorials
http://www.designmagick.com/


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

Предыдущее
От: Matthew Wilson
Дата:
Сообщение: NULL values seem to short-circuit my unique index
Следующее
От: Tom Lane
Дата:
Сообщение: Re: NULL values seem to short-circuit my unique index