pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add user-callable CRC functions.
Date: Mon, 12 Aug 2024 15:35:58 +0000
Message-ID: <E1sdX5S-003rpl-4t@gemulon.postgresql.org> (raw)

Add user-callable CRC functions.

We've had code for CRC-32 and CRC-32C for some time (for WAL
records, etc.), but there was no way for users to call it, despite
apparent popular demand.  The new crc32() and crc32c() functions
accept bytea input and return bigint (to avoid returning negative
values).

Bumps catversion.

Author: Aleksander Alekseev
Reviewed-by: Peter Eisentraut, Tom Lane
Discussion: https://postgr.es/m/CAJ7c6TNMTGnqnG%3DyXXUQh9E88JDckmR45H2Q%2B%3DucaCLMOW1QQw%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/760162fedb4f7ee6f0167cc6acfadee6ccb6be66

Modified Files
--------------
doc/src/sgml/func.sgml                   | 34 +++++++++++++++++++++++++++++++
src/backend/utils/hash/pg_crc.c          | 35 +++++++++++++++++++++++++++++++-
src/include/catalog/catversion.h         |  2 +-
src/include/catalog/pg_proc.dat          |  8 ++++++++
src/test/regress/expected/opr_sanity.out |  2 ++
src/test/regress/expected/strings.out    | 27 ++++++++++++++++++++++++
src/test/regress/sql/strings.sql         |  9 ++++++++
7 files changed, 115 insertions(+), 2 deletions(-)



Message-ID: <E1sdX5S-003rpl-4t@gemulon.postgresql.org>
Permalink:  ../E1sdX5S-003rpl-4t@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sdX5S-003rpl-4t@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add user-callable CRC functions.
  In-Reply-To: <E1sdX5S-003rpl-4t@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