Re: Binary Cursors, and the COPY command
От | Tom Lane |
---|---|
Тема | Re: Binary Cursors, and the COPY command |
Дата | |
Msg-id | 6334.1090865498@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Binary Cursors, and the COPY command (pgsql@mohawksoft.com) |
Ответы |
Re: Binary Cursors, and the COPY command
|
Список | pgsql-hackers |
pgsql@mohawksoft.com 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
В списке pgsql-hackers по дате отправления: