Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vsj9N-00Gi55-0X for pgsql-general@arkaria.postgresql.org; Wed, 18 Feb 2026 15:07:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vsj9M-00GItZ-1O for pgsql-general@arkaria.postgresql.org; Wed, 18 Feb 2026 15:07:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vsj9M-00GItP-0M for pgsql-general@lists.postgresql.org; Wed, 18 Feb 2026 15:07:36 +0000 Received: from mail-oo1-xc36.google.com ([2607:f8b0:4864:20::c36]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vsj9J-00000001ERR-34r4 for pgsql-general@postgresql.org; Wed, 18 Feb 2026 15:07:35 +0000 Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-6769719821dso1519958eaf.2 for ; Wed, 18 Feb 2026 07:07:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771427254; cv=none; d=google.com; s=arc-20240605; b=V0aK1b6sAav1cUJoaIJ5glR85HgxVDvo0FR12yvmN0R9QKNuF7nDB+ehT28Y3VI0Tq zfeA15IqIcSU8YsbTaAxAXDAtAnjNrfkWCtuenhk7JVLdh5uVdTPMUn/Zf1U/R0MWP+7 8tsiO7l6f16usVfCJWe1GgCr+/D3VyvqgBFDyYRti/Z4yQa4/A2dKhwFk3R2heN/nSHa vDw6KX/mX92ViiBuljJv2ZEUsQ033UxXty5OXgNtpV8X+tFbD8DPY/U0KBePoc2UDzA4 HpENeQOyPtKp9T6WvwfD64y9B7hldv3MIJPHnlaq84qbjS4wG9qk5pSifFqqotML7zPc FAKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=vJ8fUokxOIWKB08JB2IKMWQjY03rsRi8TSoJt+98FxI=; fh=qmtwH6nIQp1TJbtwXzJljqcPCjI1qK9KxapXtaDOCmc=; b=UW6faNJxzhuBnMyN63aChgWW1WvRXs1J0bb3L2rhh3QbKxweMclSbydLBKL+raHjqw tVxRNjAxslX3YmFXiT/n9hdiqWH3ra0TlBBshtuzvQjRhT2/7+ns5ssdYHHWPZMT44K8 G9ZMcaWg6bHIQ64NMy490dJI+c+cm1LJEWtvBLohI1LVonoTSbotp4FO9agzEK/OBK5K cUERXZQKm3YxSIuqJasIP9tehkGkvisg22DkZ0d/DQq4Zk3USqdlehLWw8DMtK7BQQ+l Msl1pE6rXmBFd2sLjsXmexZjfJt6yd1zuDklQLI85aXNGOcrt0devs9SidR2gRSdKFTy iizA==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771427254; x=1772032054; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=vJ8fUokxOIWKB08JB2IKMWQjY03rsRi8TSoJt+98FxI=; b=aUrtBtbgNDcdCIkKjbiRkthm8CXiuqv/E0nulAzLxdI/7jsChWlCuYdM63Yq3+htl0 MQgSQ70ofv5VFb8dVRaqsZoDpG+5WqXo79Nlfj89qxmatqdtbDnSIHvzQvIJJTVrxOS+ S3Soe98bPnzOgMLupju2HVv+ZRnN3gmtS15j0l0qRdenxFpRiJ8ky+2zfJj5qXhiWbJf ud0zc+h4uBJO+MvurgLIHamUe4Z+5uxViLcTfWOhB782q23N6PEP8g5GCXD1V9F9+y5r 84ZafQtqlqrNAozSzaeV63ShwHBY0jmBkKskDkY/lHFlX+zOyQcA8ZHpcutxqY7fdcoA VE4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771427254; x=1772032054; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vJ8fUokxOIWKB08JB2IKMWQjY03rsRi8TSoJt+98FxI=; b=crYJRlEhH0tzJRhs1Q/1Z3hO9zEAV09cjAWD+G8qf7YrYQYUaUMAMgzJLNVIWwvfI3 jZ8qvfQo2UgtP54AKYa2YLls8PUqaG1HULvbjZ9dy9lEeOY+80IIbLncfKAT29bpAX5V ZmNFP1Gf22cbnHSxVyBXkP/lL+KLHz8MELYLaMCEmJaapRzpCNhYmVVcdMSd0/h5C6Tb y5im1Wn8kM6dEELnBxTf2JDVdKoh7f0YmsXLJ76ij4xLqox1SY/o1KcsqhwQTAyzu1JL Wk89yKn30egzMf3gUtzvyd7G5DUqI+gEz5Ziho4PozfThJO1QVeExQnUqeRzw8eGvXET HVow== X-Gm-Message-State: AOJu0YzBYxDg5sIe1/qr6nuiKJ/7Si9CLi2P37h+GrCnMmpDDoNcu1VS 9n/kdyizyLecL8+dbIlLLsWbrM9AsXUJOx54bCRO9ze+l1FVeyeJ+wrv/FHx4CtQZdQM/lsnuQe h3RIvwjoo3C9XcB8gJJ8CaSnXPyvsoN6uoQ== X-Gm-Gg: AZuq6aJ9XawbLCyT8Y++hOBJfRJgaOdez7XEHsKXoyBH8Qd0MJzBOowOQNA+clwqQaw jkA99y8i/ucX1us3jSu4tzUtkrUpsc/9hdlwdpQC0bHoqhKEItm0jmlEPnVT1DenT5X7NDkwDNA esZuhoYRmkOJUViIsW5eTxWwAGhrYwYswQexdydsMv1Ssti35PpOpJD2wxrllPC6CZ9yhBgdpwT vATKuaGMj92NvnWLPI58J+iQEcixruspdCqka5dbS9R1vWZcKgTX37EwZV5l3broWtdqaOoakZv unALoeBC X-Received: by 2002:a05:6820:22a8:b0:679:a5a6:8331 with SMTP id 006d021491bc7-679a5a6972dmr1615700eaf.64.1771427253636; Wed, 18 Feb 2026 07:07:33 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Wed, 18 Feb 2026 10:07:22 -0500 X-Gm-Features: AaiRm51-VIF9IozQq3ev1eg_vPXqBbKu9tdN5yuGsQQUlj8QkwbEDCtHr0f9uNA Message-ID: Subject: Re: Can we get sha* function over text, that could be used in index? To: pgsql-general mailing list Content-Type: multipart/alternative; boundary="00000000000032d0dd064b1a8c65" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000032d0dd064b1a8c65 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 18, 2026 at 9:58=E2=80=AFAM hubert depesz lubaczewski 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). --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --00000000000032d0dd064b1a8c65 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Feb 18, 2026 at 9:58=E2=80=AFAM h= ubert depesz lubaczewski <depesz@de= pesz.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).

<= span class=3D"gmail_signature_prefix">--
Death to <Redacted>, and butter= sauce.
Don't boil me, I'm still alive.
<Redact= ed> lobster!
--00000000000032d0dd064b1a8c65--