[odb-users] PostgreSQL BIGINT Storage Value
Boris Kolpackov
boris at codesynthesis.com
Wed Jul 2 10:42:51 EDT 2014
Hi Mike,
Mike Ruffing <mike.ruffing at ipconfigure.com> writes:
> Could this be a bit shift or endianness issue?
Yes, that's the most likely cause. PG want it in big-endian. You
can use:
#include <odb/pgsql/details/endian-traits.hxx>
odb::pgsql::details::endian_traits::ntoh()
odb::pgsql::details::endian_traits::hton()
See odb/pgsql/traits.hxx lines 356-397 for how standard integers
are handled using these functions.
Boris
More information about the odb-users
mailing list