Re: [PATCH] Add get_bytes() and set_bytes() functions

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Aleksander Alekseev <aleksander@timescale.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-08-21T16:39:21Z
Lists: pgsql-hackers
On 19.08.24 16:10, Aleksander Alekseev wrote:
> To clarify, supporting bytea<->integer (and/or bytea<->numeric) casts
> doesn't strike me as a terrible idea but it doesn't address the issue
> I'm proposing to solve.

What is the issue you are proposing to solve?

You linked to a couple of threads and stackoverflow pages, and you 
concluded from that that we should add get_bytes() and set_bytes() 
functions.  It's not obvious how you get from the former to the latter, 
and I don't think the functions you propose are well-designed in isolation.




Commits

  1. Allow casting between bytea and integer types.