Hacker News new | ask | show | jobs
by ahoka 907 days ago
But those sequential IDs are often just not suitable due to security reasons.
1 comments

Then don’t expose them. Adapt your API, don’t break the DB.

But in any case, both of the varieties mentioned still have random components; they aren’t purely sequential. Monotonic for the time component, yes.

I cannot not expose them, they exist to be exposed.
You could map them to a v4 UUID that isn’t a PK (or even indexed), and expose that instead.