3 ms·
You can use bigserial instead of serial, which goes up to 9223372036854775807.
by arp242 4y ago
You can use bigserial instead of serial, which goes up to 9223372036854775807.
- dspillett 4y agoIf your DB supports unsigned integers, or starting sequences from -2,147,483,648, you can double the address range. But if you are at all worried that you'll get within a couple of orders of magnitude of MAXINT32 in the lifetime of your application then you should immediately jump to 64-bit values. Doubling is often just noise and the cost of refactoring if you approach MAXINT32 much faster than expected is more or a problem than the extra storage cost of bigger keys.