Re: [PATCH] Add crc32(text) & crc32(bytea)

Aleksander Alekseev <aleksander@timescale.com>

From: Aleksander Alekseev <aleksander@timescale.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Date: 2024-08-05T13:19:45Z
Lists: pgsql-hackers

Attachments

Hi,

> I'm curious why we need to do this instead of only using the macros:
>
>     INIT_TRADITIONAL_CRC32(crc);
>     COMP_TRADITIONAL_CRC32(crc, VARDATA_ANY(in), len);
>     FIN_TRADITIONAL_CRC32(crc);
>
> + * IDENTIFICATION
> + *    src/backend/utils/adt/hashfuncs.c
>
> Perhaps these would fit into src/backend/utils/hash/pg_crc.c?

Thanks, PFA patch v3.

--
Best regards,
Aleksander Alekseev

Commits

  1. Add user-callable CRC functions.

  2. Add user-callable SHA-2 functions