Re: [PATCH] Add get_bytes() and set_bytes() functions
Aleksander Alekseev <aleksander@timescale.com>
From: Aleksander Alekseev <aleksander@timescale.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Peter Eisentraut <peter@eisentraut.org>,
Dean Rasheed <dean.a.rasheed@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>,
Michael Paquier <michael@paquier.xyz>
Date: 2025-01-23T14:30:19Z
Lists: pgsql-hackers
Hi Peter, > These casts appear to use a particular endianness, but they don't > document which one, and there is no explanation anywhere why that one is > the right one. Right, I choose network order / big-endian. I agree that it would make sense to emphasise this fact in the documentation below the examples. Unfortunately I have no good reason for this particular design choice other than "well this is how it is custom to represent numbers in a consistent manner between different platforms but other than that the choice was rather arbitrary". Should I just rephrase it a bit and add to the documentation? -- Best regards, Aleksander Alekseev
Commits
-
Allow casting between bytea and integer types.
- 6da469badaff 18.0 landed