[EMAIL PROTECTED] writes: > Lastly, the vast majority of machines in use today are intel. Meaning that > they are small endian. Except in a very rare circumstance, two machines > that would normally be able to communicate in native byte order, will > ALWAYS have to convert data.
Quite honestly, that is exactly one of the reasons for using network order. If we standardized on little-endian then 90% of programmers would ignore the need to do anything about byte ordering issues, and their code would be unportable to big-endian machines. Putting a byte order flag into the header doesn't improve matters; it just forces everybody to deal with *both* orders, which is not simpler. (Except for those who would like not to be bothered with portability, which is a position I have zero sympathy for.) If you don't want to deal with this, don't use binary data. It's as simple as that. BTW, for your stated use-case of combining binary output from separate databases, I should think you'd be happy about having a not-so-machine- dependent data format. It would still work if the databases were running on servers of different endianness. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org