2 ms·
Came here to say exactly this. Programming languages usually default to signed, but if you're storing these things in databases it's common to explicitly choose
by crazygringo 1y ago
Came here to say exactly this. Programming languages usually default to signed, but if you're storing these things in databases it's common to explicitly choose unsigned, since ID's are virtually always unsigned and it gives you twice the space until you run out.
Like, instead of using negative primary keys, they could have also just have converted to an unsigned int32. I would assume both of those would break a bunch of customer implementations though.
- sgarland 1y agoPostgres doesn’t have unsigned column types out of the box. There’s an extension that enables it, but you’d have to know about that (which you should, if you’re managing a DB, but I digress). MySQL does have unsigned ints out of the box, FWIW.
- NetMageSCW 1y agoOne of them would presumably break every customer if the API was properly documented.