News for hackers. Stuff that matters.
Re:Oops, You Wrote a Database by crabbone on Sunday February 26, 2023 @03:29PM (#34949044)
Use bigint with check-between constraint?

Maybe inconvenient, but not impossible... but if this is the kind of problem you have, then, try in your favorite language to create integers that are 63 bit long or 65, and see how it goes? Looks like the comparison won't be in that language's favor.

Re:Oops, You Wrote a Database by yencabulator on Monday February 27, 2023 @02:40PM (#34960918)
Postgres bigint is a signed 64-bit integer, not an unsigned one. https://www.postgresql.org/docs/current/datatype-numeric.htm...

Trying to use it to store the full range of unsigned values would mean awkward math everywhere, to convert between the two ranges.

Lots of software uses uint64s, for e.g. as identifiers handed out by some API, and not being able to store them conveniently definitely hurts.