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

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: [PATCH] Add get_bytes() and set_bytes() functions
Date: 2025-01-23 14:30:19
Message-ID: CAJ7c6TM0cFX-M--j8zAsrTvqhtoTZY4=zybRyFyDjS994V=fYw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robin Dupret 2025-01-23 14:42:06 Re: [PATCH] Fix a tiny typo in the documentation
Previous Message Laurenz Albe 2025-01-23 13:52:03 Re: doc: explain pgstatindex fragmentation