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

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add crc32(text) & crc32(bytea)
Date: 2024-08-08 14:27:20
Message-ID: a182edc7-c558-47c6-9ab0-94c4dd970e3b@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05.08.24 17:28, Nathan Bossart wrote:
> This looks pretty good to me. The only point that I think deserves more
> discussion is the return type. Does bytea make the most sense here? Or
> should we consider int/bigint?

The correct return type of a CRC operation in general is some kind of
exact numerical type. Just pick the best one that fits the result. I
don't think bytea is appropriate.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-08-08 14:35:33 Re: [PATCH] Add crc32(text) & crc32(bytea)
Previous Message Tender Wang 2024-08-08 14:25:35 Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails