From: | Neil Conway <neilc(at)samurai(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: Hash function for numeric (WIP) |
Date: | 2007-05-07 01:51:59 |
Message-ID: | 1178502719.18303.176.camel@goldbach |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
On Sun, 2007-06-05 at 21:30 -0400, Tom Lane wrote:
> You can do it always if you simply decrement the weight for each leading
> zero removed.
On reflection, the patch as given was wrong anyway: if two Numerics are
identical except for the presence of leading zeroes, we can't consider
the weight when hashing one of them but not the other.
> The patch as given is wrong since it makes the test for no-digits
> before instead of after removing zeroes.)
Okay, how about the attached revision?
> It'd be a good idea if you repeat the previous number-of-collisions
> experiment on this code.
I'll do this shortly.
-Neil
Attachment | Content-Type | Size |
---|---|---|
numeric_hash_func-7.patch | text/x-patch | 9.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | ITAGAKI Takahiro | 2007-05-07 01:54:45 | Re: Clear up strxfrm() in UTF-8 with locale on Windows |
Previous Message | Tom Lane | 2007-05-07 01:30:14 | Re: Hash function for numeric (WIP) |