Re: How does PostgreSQL treat null values in unique composite

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: How does PostgreSQL treat null values in unique composite
Дата
Msg-id 20030408133754.J54456-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: How does PostgreSQL treat null values in unique composite  (P G <pg_dba@yahoo.com>)
Список pgsql-admin
On Tue, 8 Apr 2003, P G wrote:

> > Where can I find the documentation cited for the
> > "unique predicate" mentioned below?
That's the SQL92 draft, although I believe the SQL99 text is effectively
the same.  The sections are 11.7 (for the definition of the constraint
in terms of the predicate) and 8.9 for the predicate itself (General Rule
2 specifically)

> Also, the "unique predicate" only explains what it
> means to be unique, but it says nothing about how null
> values are treated.  Will someone explain what the
> value of null is?

It isn't a precise value.  It's a holder for unknown.  It's unknown
whether it's equal or not equal to any other value (including another
NULL), so 1 = NULL returns unknown, NULL=NULL returns unknown, 1!=NULL
returns unknown.


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

Предыдущее
От: Jeff Boes
Дата:
Сообщение: Re: pg_class.reltuples not reset by VACUUM?
Следующее
От: Bill Hilburn
Дата:
Сообщение: urgent, Table not shown but files are there.