Re: [PATCH] Add crc32(text) & crc32(bytea) - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: [PATCH] Add crc32(text) & crc32(bytea)
Date
Msg-id ZrJW_0CVXRgXjNkv@nathan
Whole thread Raw
In response to Re: [PATCH] Add crc32(text) & crc32(bytea)  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: [PATCH] Add crc32(text) & crc32(bytea)
List pgsql-hackers
On Tue, Aug 06, 2024 at 11:04:41AM +0300, Aleksander Alekseev wrote:
> Perhaps we need get_int4() / get_int8() / get_numeric() as there seems
> to be a demand [1][2] and it will allow us to easily cast a `bytea`
> value to `integer` or `bigint`. This is probably another topic though.

Yeah, I was surprised to learn there wasn't yet an easy way to do this.
I'm not sure how much of a factor this should play in deciding the return
value for the CRC functions, but IMHO it's a reason to reconsider returning
text as you originally proposed.

-- 
nathan



pgsql-hackers by date:

Previous
From: Kirill Reshke
Date:
Subject: Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW
Next
From: Robert Haas
Date:
Subject: Re: pg_verifybackup: TAR format backup verification