[odb-users] PostgreSQL BIGINT Storage Value
Mike Ruffing
mike.ruffing at ipconfigure.com
Wed Jul 2 09:53:02 EDT 2014
Boris,
Operating System: Ubuntu 14.04 LTS
ODB: 2.3.0
PostgreSQL: 9.3
I am using a custom mapping that converts a posix_time::ptime and posix_time::time_duration to a long long. The long long value is mapped to PosgreSQL's BIGINT type. Using print statements I verified I am getting the correct conversion values (long long) in the "set_image" and "set_value" methods. However the values stored in the PostgreSQL database do not match. Monitoring the PostgreSQL log files I verified the incorrect values (representation) are being inserted into the database. Since "set_value" is getting the correct "long long" value I'm guessing that the values stored in the database are related to the original value. Could this be a bit shift or endianness issue? Note: I am not seeing this issue using SQLite.
Here is an example of the converted value ("set_image") and final value (via pgsql log) inserted into the database:
1404308405507732 -7757826360135056384
Thanks,
Mike Ruffing
More information about the odb-users
mailing list