Re: Add SQL function for SHA1

Поиск
Список
Период
Сортировка
От Sehrope Sarkuni
Тема Re: Add SQL function for SHA1
Дата
Msg-id CAH7T-aod_q65EBR=eL1BFog==4wsHw0cEh5-_F6UCpNFsvzFpA@mail.gmail.com
обсуждение исходный текст
Ответ на Add SQL function for SHA1  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Add SQL function for SHA1  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
+1 to adding a SHA1 SQL function. Even if it's deprecated, there's plenty of historical usage that I can see it being useful. 

Either way, the rest of the refactor can be improved a bit to perform a single palloc() and remove the memcpy(). Attached is a diff for cryptohashfuncs.c that does that by writing the digest final directly to the result. It also removes the digest length arg and determines it in the switch block. There's only one correct digest length for each type so there's no reason to give callers the option to give the wrong one.

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: patch: reduce overhead of execution of CALL statement in no atomic mode from PL/pgSQL
Следующее
От: japin
Дата:
Сообщение: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax