Re: [PATCH] Add get_bytes() and set_bytes() functions - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: [PATCH] Add get_bytes() and set_bytes() functions
Date
Msg-id CAJ7c6TM0cFX-M--j8zAsrTvqhtoTZY4=zybRyFyDjS994V=fYw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add get_bytes() and set_bytes() functions  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: [PATCH] Add get_bytes() and set_bytes() functions
List 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



pgsql-hackers by date:

Previous
From: Japin Li
Date:
Subject: Re: Increase NUM_XLOGINSERT_LOCKS
Next
From: Robin Dupret
Date:
Subject: Re: [PATCH] Fix a tiny typo in the documentation