Re: Fast, stable, portable hash function producing 4-byte or 8-byte values?

From: George Neuner <gneuner2(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Fast, stable, portable hash function producing 4-byte or 8-byte values?
Date: 2019-12-17 20:06:58
Message-ID: 3kcivehh2al2cjti29r80ifpm2q9ncl51t@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 15 Dec 2019 20:23:25 -0600, Ron <ronljohnsonjr(at)gmail(dot)com>
wrote:

>On 12/15/19 3:59 PM, George Neuner wrote:
>
>> On long text CRC will not be as discriminating as a real cryptohash,
>
>When specifying a 4 byte hash, something must be sacrificed...

Obviously. But the main point is that CRC never was designed to
uniquely fingerprint data - it was designed to detect corruption of
the data, which is a much weaker guarantee than the cryptodigest
hashes.

Despite being the same length as an MD5 hash, a 128-bit CRC still
might not be as discriminating ... it depends greatly on the CRC
polynomial used and on the length of the input.

George

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-12-18 00:09:45 Re: Row locks, SKIP LOCKED, and transactions
Previous Message Tom Lane 2019-12-17 17:04:20 Re: weird long time query