Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 7FEB3634F63 for ; Wed, 3 Jun 2009 05:27:18 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 22379-02-2 for ; Wed, 3 Jun 2009 05:27:04 -0300 (ADT) Received: from mx3.hub.org (mx3.hub.org [206.223.169.73]) by mail.postgresql.org (Postfix) with ESMTP id DE4FD634B41 for ; Wed, 3 Jun 2009 05:27:00 -0300 (ADT) X-Greylist: delayed 00:25:18.652303 by SQLgrey-1.7.6 Received: from auth-smtp.nebula.fi (auth-smtp.nebula.fi [217.30.180.105]) by mx3.hub.org (Postfix) with ESMTP id 3015B37BA2F for ; Wed, 3 Jun 2009 05:26:50 -0300 (ADT) Received: from [127.0.0.1] (gw.nitor.fi [83.145.228.24]) (authenticated bits=0) by auth-smtp.nebula.fi (8.13.4/8.13.4) with ESMTP id n5380aaZ015206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Jun 2009 11:00:37 +0300 Message-ID: <4A262DA2.5050209@nitorcreations.com> Date: Wed, 03 Jun 2009 11:00:34 +0300 From: Mikko Tiihonen User-Agent: Thunderbird 2.0.0.21 (X11/20090409) MIME-Version: 1.0 To: Albe Laurenz CC: Jesper Pedersen *EXTERN* , pgsql-jdbc@postgresql.org Subject: Re: [Patch] Binary Transfer v12 References: <200906020944.33321.jesper.pedersen@jboss.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200906/9 X-Sequence-Number: 19673 Albe Laurenz wrote: > Jesper Pedersen wrote: >> I have updated the binary transfer patch against latest CVS/HEAD. >> >> http://wiki.postgresql.org/wiki/JDBC-BinaryTransfer > > Sounds great! > > Did you test it with both little-endian and big-endian servers? > With 32-bit and 64-bit servers? I have only tested with 64bit amd64 servers. Luckily the protocol is well defined to always use network byte order: http://developer.postgresql.org/pgdocs/postgres/protocol-message-types.html The incompatible bits of the protocol are in feature flags. For example the time can either be a double as seconds or long as microseconds. The default has just changed in 8.4, but the binary transfer patch has supported both since the beginning. > I don't know for sure, but all this *might* affect the binary format. But now you got me wondering... The protocol messages itself are well defined, but I cannot find any documentation about the data value contents because there is no official documentation. I had to just guess how the values are stored. Based on the data type byte sizes in database, for example look here: http://developer.postgresql.org/pgdocs/postgres/datatype-datetime.html -Mikko