[PATCH] Add reverse(bytea)
Hi,
The proposed patch adds reverse(bytea) function.
This allows converting between big-endian and little-endian binary
strings, which works nicely with previous commits [1]https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=760162fedb4f and [2]https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=6da469badaff.
[1]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=760162fedb4f
[2]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=6da469badaff
--
Best regards,
Aleksander Alekseev
Attachments:
v1-0001-Add-reverse-bytea-function.patchapplication/octet-stream; name=v1-0001-Add-reverse-bytea-function.patchDownload+73-1
On Mon, Mar 10, 2025 at 10:40:01AM +0300, Aleksander Alekseev wrote:
The proposed patch adds reverse(bytea) function.
We already have array_reverse() and text_reverse(), so I see no strong
reason against also having a bytea_reverse().
--
nathan
On 10 Mar 2025, at 22:06, Nathan Bossart <nathandbossart@gmail.com> wrote:
On Mon, Mar 10, 2025 at 10:40:01AM +0300, Aleksander Alekseev wrote:
The proposed patch adds reverse(bytea) function.
We already have array_reverse() and text_reverse(), so I see no strong
reason against also having a bytea_reverse().
+1
--
Daniel Gustafsson
Nathan, Daniel,
We already have array_reverse() and text_reverse(), so I see no strong
reason against also having a bytea_reverse().+1
I also considered adding reverse(bit) however to my knowledge there is
no practical usage for it.
--
Best regards,
Aleksander Alekseev
Here is what I have staged for commit. The only differences from v1 are
some very light edits.
--
nathan