views:

86

answers:

1

I have a libpq program that is routinely inserting numbers into a database. These numbers, which I'm expecting to grow quite large, are stored int the uint64_t type. I'm wanting to send the integer to libpq as binary, but Postgres won't be able to tell its unsigned. Is there a way to specify an unsigned integer in Postgres or libpq?

+1  A: 

There are no unsigned datatypes in PostgreSQL.

If you really are going over 9223372036854775808, then you should use NUMERIC data type.

depesz