3 ms·
Generally, I agree. But in many RDBMSs, auto-increment features explicitly do not guarantee gap-less sequential ordering. If anything throws, it's easy to end
by mtVessel 6y ago
Generally, I agree. But in many RDBMSs, auto-increment features explicitly do not guarantee gap-less sequential ordering. If anything throws, it's easy to end up with discarded numbers, in which case you need to catch all errors, inspect the state of the sequence and/or the entity you're populating, and re-seed the sequence. At this point, I'd argue you've already left the pristine gardens of set theory and wandered into the thorny brambles of app dev.
- LoSboccacc 6y agoah! TIL: MYSQL - https://stackoverflow.com/questions/449346/mysql-auto-increment-does-not-rollback https://stackoverflow.com/questions/449346/mysql-auto-increm... POSTGRES - https://stackoverflow.com/questions/2095917/sequences-not-affected-by-transactions https://stackoverflow.com/questions/2095917/sequences-not-af... thanks!