Re: PostgreSQL's hashing function?

From: Greg Stark <stark(at)enterprisedb(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Kynn Jones <kynnjo(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL's hashing function?
Date: 2008-02-23 01:12:16
Message-ID: 47BF72F0.3000501@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joshua D. Drake wrote:
> On Fri, 22 Feb 2008 16:49:10 -0500
> "Kynn Jones" <kynnjo(at)gmail(dot)com> wrote:
>
>
>> Hi!
>> Does PostgreSQL expose its hash function? I need a fast way to hash a
>> string to a short code using characters in the set [A-Za-z0-9_].
>>
> Is md5 good enough? :)
>

Probably not. He said fast.

You could use hashtext() which is Postgres's internal hash function.
There's some possibility it could change in future versions of Postgres
though.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ralph Smith 2008-02-23 01:57:17 v7.4 pg_dump(all) need to encode from SQL_ASCII to UTF8
Previous Message Stephen Davies 2008-02-23 00:43:29 Re: ts_headline