Re: New data type: uniqueidentifier

Поиск
Список
Период
Сортировка
От Alex Pilosov
Тема Re: New data type: uniqueidentifier
Дата
Msg-id Pine.BSO.4.10.10106261758560.21119-100000@spider.pilosoft.com
обсуждение исходный текст
Ответ на New data type: uniqueidentifier  ("Dmitry G. Mastrukov" <dmitry@taurussoft.org>)
Список pgsql-hackers
On Tue, 26 Jun 2001, Dmitry G. Mastrukov wrote:

> myself some things.
> I've marked "=" operator with HASH clause (and planner has started to use
> hash jons). But as I understand the right way is to create special hash
> function (may be wrapper for hash_any(), isn't it?) and register it for hash
> as for btree method.

No. Currently, there's no way to specify a hash function for a given
operator, it always uses a builtin function that operates on memory
representation of a value.

There's no need (or possibility) to register a hash with btree method.

> So is it desirable to mark "=" as HASH for this type (seems internal 16 byte
> representation will be hash well) and if yes how can I create hash sort
> method for uniqueidentifier?
You can mark it hashable, since two identical uuid values would have
identical memory representation and thus the same hash value. 

I'd look at your code, but that is URL too slow, in 5 minutes downloaded
1000 bytes...

> regards,
> Dmitry
> 
> PS. If you decide to install uniqueidentifier look at the date of
> uuid/uuid.h somewhere in INCLUDE path. Sometimes it's necessary to manualy
> enter "make install" in lib/uuid directory of e2fsprogs.



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

Предыдущее
От: Alex Pilosov
Дата:
Сообщение: functions returning records
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Re: Encrypting pg_shadow passwords