Add SQL function for SHA1

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Add SQL function for SHA1
Date: 2021-01-25 13:12:28
Message-ID: YA7DvLRn2xnTgsMc@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

SHA-1 is now an option available for cryptohashes, and like the
existing set of functions of SHA-2, I don't really see a reason why we
should not have a SQL function for SHA1. Attached is a patch doing
that.

The same code pattern was repeated 4 times on HEAD for the SHA-2
functions for the bytea -> bytea hashing, so I have refactored the
whole thing while integrating the new function, shaving some code from
cryptohashfuncs.c.

Thoughts?
--
Michael

Attachment Content-Type Size
sha1-sql-v1.patch text/x-diff 9.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Nancarrow 2021-01-25 13:14:14 Re: Parallel INSERT (INTO ... SELECT ...)
Previous Message 'Alvaro Herrera' 2021-01-25 13:11:10 Re: libpq debug log