X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 283DED1B392 for ; Mon, 26 Jul 2004 15:12:06 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32533-01 for ; Mon, 26 Jul 2004 18:11:48 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 19B57D1B772 for ; Mon, 26 Jul 2004 15:11:41 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i6QIBcsB006335; Mon, 26 Jul 2004 14:11:38 -0400 (EDT) To: pgsql@mohawksoft.com Cc: pgsql-hackers@postgresql.org Subject: Re: Binary Cursors, and the COPY command In-reply-to: <10519.64.119.142.34.1090863707.squirrel@mail.mohawksoft.com> References: <10519.64.119.142.34.1090863707.squirrel@mail.mohawksoft.com> Comments: In-reply-to pgsql@mohawksoft.com message dated "Mon, 26 Jul 2004 13:41:47 -0400" Date: Mon, 26 Jul 2004 14:11:38 -0400 Message-ID: <6334.1090865498@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/1264 X-Sequence-Number: 56825 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