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

From Peter Eisentraut
Subject Re: Can we get sha* function over text, that could be used in index?
Date
Msg-id 3dbae091-6168-4b4b-91dc-4bf1a3a51136@eisentraut.org
Whole thread Raw
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 18.02.26 15:58, hubert depesz lubaczewski wrote:
> And while I kinda undestand, create-conversion, server-encoding, I don't
> really*grok* why we can't have immutable conversion to bytea. And/or
> versions of sha* functions that simply work on text.

Hash functions fundamentally work on a sequence of bytes, so bytea is 
the right type.  The encoding of text into bytes is complicated, so it 
seems better if you handle that yourself depending on the local 
requirements.




pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Bug: PG 14 recovery failure
Next
From: Koen De Groote
Date:
Subject: Re: Postgres restore sometimes restores to a point 2 days in the past