From: | Alex Pilosov <alex(at)pilosoft(dot)com> |
---|---|
To: | "Dmitry G(dot) Mastrukov" <dmitry(at)taurussoft(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: New data type: uniqueidentifier |
Date: | 2001-06-26 22:02:46 |
Message-ID: | Pine.BSO.4.10.10106261758560.21119-100000@spider.pilosoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-06-26 23:17:21 | Re: Re: Encrypting pg_shadow passwords |
Previous Message | Alex Pilosov | 2001-06-26 21:11:47 | functions returning records |