0

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
  • When you say you're expecting them to grow "quite large" - genuinely over (2^63)-1? Commented Aug 19, 2009 at 15:13

1 Answer 1

1

There are no unsigned datatypes in PostgreSQL.

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.