Comment by mahboi
17 hours ago
Yeah this was odd: "Superficially, it seems that embedding a timestamp in the ID can remove the need to track the creation time in a separate database column" Who actually tried to do this?
I didn't assume uuid7 was guaranteed monotonic either. Of course not if you have different clocks. That's not the point of it.
I have never tried to do this myself, for the obvious reasons you've stated, but postgres has a function to do it so clearly enough people did do it:
https://www.postgresql.org/docs/current/functions-uuid.html#...
It makes sense. Since part of the UUID is a timestamp, there should exist a way to extract it.