A
A
Alexander Vladimirovich2019-02-28 09:05:00
PostgreSQL
Alexander Vladimirovich, 2019-02-28 09:05:00

How to create bigint unsigned?

Greetings!
How to set a bigint unsigned field in postgresql so that the range is
0 to 18446744073709551615
because if you set signed the range will be -9223372036854775808 to 9223372036854775807
.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Cherepakhin, 2019-02-28
@AltZ

Make an offset by a constant = 9223372036854775807, i.e. subtract from the value. Then add the same constant to get the value.
If they are only for viewing purposes, keep them in text.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question