Re: Hash function for numeric (WIP)
От
Neil Conway
Тема
Re: Hash function for numeric (WIP)
Дата
Msg-id
1178500985.18303.170.camel@goldbach
Ответ на
Re: Hash function for numeric (WIP) (Tom Lane)
Список
Дерево обсуждения
Hash function for numeric (WIP) Neil Conway <neilc@samurai.com>
Re: Hash function for numeric (WIP) Tom Lane <tgl@sss.pgh.pa.us>
Re: Hash function for numeric (WIP) Neil Conway <neilc@samurai.com>
Re: Hash function for numeric (WIP) Tom Lane <tgl@sss.pgh.pa.us>
Re: Hash function for numeric (WIP) Neil Conway <neilc@samurai.com>
Re: Hash function for numeric (WIP) Tom Lane <tgl@sss.pgh.pa.us>
Re: Hash function for numeric (WIP) Neil Conway <neilc@samurai.com>
Re: Hash function for numeric (WIP) Tom Lane <tgl@sss.pgh.pa.us>
Re: Hash function for numeric (WIP) Neil Conway <neilc@samurai.com>
Re: Hash function for numeric (WIP) Tom Lane <tgl@sss.pgh.pa.us>
Re: Hash function for numeric (WIP) Neil Conway <neilc@samurai.com>
Re: Hash function for numeric (WIP) Neil Conway <neilc@samurai.com>
Re: Hash function for numeric (WIP) Tom Lane <tgl@sss.pgh.pa.us>
On Thu, 2007-03-05 at 23:57 -0400, Tom Lane wrote: > Hm, but apply hash_any() to the remaining digits? That might work, if > you are careful about how you factor the weight into it (or just not try > to use the weight in the hash). Attached is a patch that implements this idea. Since leading or trailing zeroes are far from the common case, I think we should still include the weight in the hash when possible: the patch does so when it doesn't find a leading zero in the Numeric. I did some testing by constructing an in-memory Numeric with leading and trailing zeroes, and this approach seems to work. Unless you see anything else that needs fixing, I'll apply this patch to HEAD in a day or two. -Neil
В списке pgsql-patches по дате отправления