Joshua D. Drake wrote:
> On Fri, 22 Feb 2008 16:49:10 -0500
> "Kynn Jones" <kynnjo@gmail.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.