Jeff Davis <[EMAIL PROTECTED]> writes: > On Sat, 2004-06-05 at 13:31, Tom Lane wrote: >> Only if you want to require a hash opclass to supply ordering operators, >> which sort of defeats the purpose I think. Hash is only supposed to >> need equality not ordering.
> Is it possible to assume some kind of ordering (i.e. strcmp() the binary > data of the type) as long as it's consistent? Not really; that would assume that equality of the datatype is the same as bitwise equality, which is not the case in general (consider -0 versus +0 in IEEE floats, or any datatype with pad bits in the struct). Some time ago we got rid of the assumption that hash should hash on all the bits without any type-specific intervention, and I don't want to reintroduce those bugs. We could safely sort on the hash value, but I'm not sure how effective that would be, considering that we're talking about values that already hashed into the same bucket --- there's likely not to be very many distinct hash values there. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])