Re: [Patch] Binary Transfer v12 - Mailing list pgsql-jdbc

From Mikko Tiihonen
Subject Re: [Patch] Binary Transfer v12
Date
Msg-id 4A262DA2.5050209@nitorcreations.com
Whole thread Raw
In response to Re: [Patch] Binary Transfer v12  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Responses Re: [Patch] Binary Transfer v12  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Re: [Patch] Binary Transfer v12  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: [Patch] Binary Transfer v12
Next
From: "Albe Laurenz"
Date:
Subject: Re: [Patch] Binary Transfer v12