Re: Hash Function: MD5 or other?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Shelby Cain <alyandon(at)yahoo(dot)com>
Cc: Peter Fein <pfein(at)pobox(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Hash Function: MD5 or other?
Date: 2005-06-14 06:40:59
Message-ID: 87zmtt1lvo.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Shelby Cain <alyandon(at)yahoo(dot)com> writes:

> > My question is: is the builtin MD5 appropriate for this use or should I be
> > using a function from pl/something? Figures on collision rates would be
> > nice as well - the typical chunk of text is probably 1k-8k.

Note that MD5 is slow and CPU-intensive. By design.

If you want a quick way to find matching records then you might find something
like CRC to be more useful. With MD5 it's supposed to be hard for someone to
come up with inputs that hash to a target value, but if you're not too worried
about people trying to do that then MD5 is probably overkill.

--
greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Howard Cole 2005-06-14 07:35:57 Re: New to Postgre
Previous Message Shelby Cain 2005-06-14 00:55:20 Re: Hash Function: MD5 or other?