pgsql: Add user-callable CRC functions. - Mailing list pgsql-committers

From Nathan Bossart
Subject pgsql: Add user-callable CRC functions.
Date
Msg-id E1sdX5S-003rpl-4t@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: David Rowley
Date:
Subject: pgsql: Fix outdated comments
Next
From: Tom Lane
Date:
Subject: pgsql: Log more info when wait-for-catchup tests time out.