Skip site navigation (1) Skip section navigation (2)

Re: Hash function for numeric (WIP)

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-04-28 22:47:10
Message-ID: 1177800430.6440.182.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Sorry for fat-fingering the previous reply -- I wanted to add:

On Fri, 2007-04-27 at 10:02 -0400, Tom Lane wrote:
> Perhaps a sufficiently robust way would be to form the hash as the
> XOR of each supplied digit, circular-shifted by say 3 times the
> digit's weight. 

The only objection I have to this is that it means we need to have
another hash function in the backend. The Jenkins hash we use in
hash_any() has been studied and we can have at least some confidence in
its collision-resistance, etc.

Anyway, attached is a revised version of the hash_any()-based patch.


Attachment: numeric_hash_func-3.patch
Description: text/x-patch (8.1 KB)

In response to


pgsql-patches by date

Next:From: Neil ConwayDate: 2007-04-29 01:27:32
Subject: Re: actualised forgotten Magnus's patch for plpgsql MOVEstatement
Previous:From: Neil ConwayDate: 2007-04-28 22:41:26
Subject: Re: Hash function for numeric (WIP)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group