Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, but that requires basically a special favor from the DBA to create the trigger for what feels like a basic, common-enough data-load task...

What I normally see though is that the auto-incrementing sequence (at least in MS SQL Server or Oracle) isn't clever enough to say "wow, that id already exists on your table somehow? Here let me bump the sequence again and you try again with a higher ID..."

Instead you get a 2am alarm because the generated sequence somehow ran into the block of IDs that you inserted into the table and crashed with a PK unique constraint violation.

Hence UUIDv7 or ULIDs being easy to insert from the temp table into the main table.



It's easier if you have a non-PK UUID column you can use as a crutch.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: