Re: Unique Index

Поиск
Список
Период
Сортировка
От Tino Wildenhain
Тема Re: Unique Index
Дата
Msg-id 1106206470.4014.89.camel@Andrea.peacock.de
обсуждение исходный текст
Ответ на Re: Unique Index  ("J. Greenlees" <jaqui@telus.net>)
Ответы Re: Unique Index  ("J. Greenlees" <jaqui@telus.net>)
Список pgsql-general
Hi,

Am Mittwoch, den 19.01.2005, 15:02 -0800 schrieb J. Greenlees:
> Roman Neuhauser wrote:
> > # alex@meerkatsoft.com / 2005-01-20 01:35:32 +1100:
> >
> >>i have a unique index on a table over multiple columns. If now one of
> >>the records has a null value in one of the indexed columns i can insert
> >>the same record multiple times.
> >>
> >>Is this a problem within postgres or expected?
> >
> >
> >     In SQL, NULL means "unknown value". How could you assert that two
> >     NULLs are equal?
> >
> which doesn't make mathematical sense.
> mathwise null is an empty result.
> so setting the logic up using the math logic, null values are always equal.

What kind of mathematics you are speaking?
For example you have "infinity" where infinity is never
equal to infinity.
Same with null. Which is "unknown" or "undefined"
So if x is undefined and y is undefined you cannot
assume x=y  - because if you assume this, then
they would not be undefined anymore.

q.e.d.

Regards
Tino


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

Предыдущее
От: "Vincent Hikida"
Дата:
Сообщение: Re: Unique Index
Следующее
От: Ian Barwick
Дата:
Сообщение: Re: Oracle and Postgresql Play Nice Together on Same Computer?