Re: Document hashtext() and Friends?

From: "ktm(at)rice(dot)edu" <ktm(at)rice(dot)edu>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Cc: Michael Glaesemann <grzm(at)seespotcode(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Document hashtext() and Friends?
Date: 2012-02-21 20:30:59
Message-ID: 20120221203059.GE21114@aart.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 21, 2012 at 12:14:03PM -0800, David E. Wheeler wrote:
> On Feb 21, 2012, at 12:11 PM, Michael Glaesemann wrote:
>
> > And hashtext *has* changed across versions, which is why Peter Eisentraut published a version-independent hash function library: https://github.com/petere/pgvihash
>
> Yes, Marko wrote one, too:
>
> https://github.com/markokr/pghashlib
>
> But as I’m about to build a system that is going to have many billions of nodes, I could use a variant that returns a bigint. Anyone got a pointer to something like that?
>
> Thanks,
>
> David
>

Hi David,

The existing hash_any() function can return a 64-bit hash, instead of the current
32-bit hash, by returning the b and c values, instead of the current which just
returns the c value, per the comment at the start of the function. It sounded like
Peter had already done this in his pg_stat_statements normalization patch, but I
could not find it.

Regards,
Ken

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2012-02-21 20:50:36 Re: Document hashtext() and Friends?
Previous Message Tom Lane 2012-02-21 20:30:05 Re: Document hashtext() and Friends?