[odb-users] Problems while trying the samples

Boris Kolpackov boris at codesynthesis.com
Thu Nov 17 13:44:39 EST 2011

Hi Fernando,

Fernando Felix-Redondo <ffelixr at gmail.com> writes:

> This is my first time with ODB so I'm a bit lost. I've installed all the
> component folowing the INSTALL files and I have tried to run some of the
> samples with my DB (Postgresql 8.1.23). Unfortunately I always get the
> following error message when I run them:
> "unsupported binary format for PostgreSQL date-time SQL types"

PostgreSQL supports two representations of the TIME and TIMESTAMP
types: 64-bit integer and floating-point. The floating-point
representation has a number of drawbacks[1] and, AFAICT, since
version 8.4 the integer representation is the default. You seem
to be using an older version that is still configured to use the

ODB only supports the integer representation and checks that it
is talking to a compatible server at the connection establishment
time. If the date-time representation is floating-point, it throws
an exception.

I see two ways how you can resolve this. The easiest is probably to
upgrade to a newer version of PostgreSQL (or rebuild this version
with the integer representation enabled). Alternatively, if you must
use this server, then you can disable the check in the ODB source
code (connection.cxx in libodb-pgsql; search for "unsupported binary
format"). This will work as long as you don't use the TIME and

[1] http://postgresql.1045698.n5.nabble.com/Integer-datetimes-td1979958.html 


More information about the odb-users mailing list