Re: How does PostgreSQL treat null values in unique

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: How does PostgreSQL treat null values in unique
Дата
Msg-id 1049850484.1008.4.camel@tokyo
обсуждение исходный текст
Ответ на Re: How does PostgreSQL treat null values in unique composite  ("Jim C. Nasby" <jim@nasby.net>)
Ответы Re: How does PostgreSQL treat null values in unique  ("Jim C. Nasby" <jim@nasby.net>)
Список pgsql-general
On Tue, 2003-04-08 at 20:31, Jim C. Nasby wrote:
> Take note that there is no standard for how NULLs are handled in unique
> constraints, though.

On the contrary, there *is* a standard for this behaviour (namely, the
SQL standard). For example, section 4.18.2 of the SQL 200x draft
standard says:

"A unique constraint is satisfied if and only if no two rows in a table
have the same non-null values in the _unique columns_."

Some databases might not follow this part of the spec, but the standard
is pretty clear, AFAICS.

Cheers,

Neil


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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: How does PostgreSQL treat null values in unique composite
Следующее
От: john.murdoch@ig.com.br
Дата:
Сообщение: Strange Error, with unique key