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
> 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.
In response to
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 2001-06-26 23:17:21|
|Subject: Re: Re: Encrypting pg_shadow passwords|
|Previous:||From: Alex Pilosov||Date: 2001-06-26 21:11:47|
|Subject: functions returning records|