Re: Can we get sha* function over text, that could be used in index? - Mailing list pgsql-general

From Ron Johnson
Subject Re: Can we get sha* function over text, that could be used in index?
Date
Msg-id CANzqJaD7mjDcXKNcESLJ+oOd0GDZQvCc45hvGc7LD+zW9COKUg@mail.gmail.com
Whole thread
In response to Can we get sha* function over text, that could be used in index?  (hubert depesz lubaczewski <depesz@depesz.com>)
Responses Re: Can we get sha* function over text, that could be used in index?
List pgsql-general
On Wed, Feb 18, 2026 at 9:58 AM hubert depesz lubaczewski <depesz@depesz.com> wrote:
Hi,
So, we have various sha* functions.

And I recently got asked about using them as a based for unique index
over long texts.
Normally one would do it with md5(text), but the person asking wanted to
use sha().

I think I'd push back, asking them if they really need cryptographically-secure hashing (which they most probably don't).

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Can we get sha* function over text, that could be used in index?
Next
From: Linus Heckemann
Date:
Subject: Re: Can we get sha* function over text, that could be used in index?