4 ms·
I don't know what DB was used in this csae, but Postgres doesn't have unsigned integers. It always struck me as hugely wasteful, as e.g. sequences start at zero
by afandian 1y ago
I don't know what DB was used in this csae, but Postgres doesn't have unsigned integers. It always struck me as hugely wasteful, as e.g. sequences start at zero by default.
- masklinn 1y agoAt $dayjob we've actually used this property once or twice: if you need to merge two tables you can keep the positive ids for the first one, and use negative ids for the second one. It only works once, but damn if it's not effective when you need it, and it conveniently flags all the records with an id under some limit (positive and negative both) as "pre-transition" record when you're looking for patterns.
- afandian 1y agoI’ve also seen positive and negative ids for entities with different properties (can’t recall what). Felt like an unnecessary hack though.
- kristianp 1y agoIt's mysql.