pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor SQL functions of SHA-2 in cryptohashfuncs.c
Date: Thu, 28 Jan 2021 07:14:09 +0000
Message-ID: <E1l51VJ-0002ek-JY@gemulon.postgresql.org> (raw)

Refactor SQL functions of SHA-2 in cryptohashfuncs.c

The same code pattern was repeated four times when compiling a SHA-2
hash.  This refactoring has the advantage to issue a compilation warning
if a new value is added to pg_cryptohash_type, so as anybody doing an
addition in this area would need to consider if support for a new SQL
function is needed or not.

Author: Sehrope Sarkuni, Michael Paquier
Discussion: https://postgr.es/m/YA7DvLRn2xnTgsMc@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f854c69a5b36ba7aa85bee9e9590c3e517970156

Modified Files
--------------
src/backend/utils/adt/cryptohashfuncs.c | 138 +++++++++++++-------------------
1 file changed, 54 insertions(+), 84 deletions(-)



Message-ID: <E1l51VJ-0002ek-JY@gemulon.postgresql.org>
Permalink:  ../E1l51VJ-0002ek-JY@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1l51VJ-0002ek-JY@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Refactor SQL functions of SHA-2 in cryptohashfuncs.c
  In-Reply-To: <E1l51VJ-0002ek-JY@gemulon.postgresql.org>
  References: <E1l51VJ-0002ek-JY@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox