Re: BUG #3965: UNIQUE constraint fails on long column values

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #3965: UNIQUE constraint fails on long column values
Дата
Msg-id 8535.1203523485@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #3965: UNIQUE constraint fails on long column values  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-bugs
Gregory Stark <stark@enterprisedb.com> writes:
> "Heikki Linnakangas" <heikki@enterprisedb.com> writes:
>> Return type of hash* functions is just 32 bits. I wonder if that's wide enough
>> to avoid accidental collisions? Depends on the application of course...

> Oh, I missed that you were suggesting a UNIQUE index. That seems unsafe to me
> even for md5 or its ilk. But that would depend on the application too.

md5 is designed to be a signature, remember?  If there weren't a very
high probability of its output being different for different inputs,
it wouldn't be good for anything.

The built-in hash functions definitely cannot be relied on to not have
collisions, though.

            regards, tom lane

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: BUG #3965: UNIQUE constraint fails on long column values
Следующее
От: Tom Lane
Дата:
Сообщение: Re: GetNewOidWithIndex can cause infinite loop on user tables(not catalog).