3 ms·
Also a fan of this format though I wish it was native to postgres so we dont have to convert to UUID for storage (maybe a custom type would do it). For referen
by Sytten 4y ago
Also a fan of this format though I wish it was native to postgres so we dont have to convert to UUID for storage (maybe a custom type would do it).
For reference here is my plpgsql implementation: https://gist.github.com/Sytten/8fa334e8a5de5d49924c794811a809fb https://gist.github.com/Sytten/8fa334e8a5de5d49924c794811a80...
- canadiantim 4y agoisn't UUID v7 basically ULID? So you can just use UUID v7 for same effect
- Macha 4y agoUUIDv7 is still a draft, but seems relatively uncontroversial so will likely be accepted. Still a lot of libraries and systems with uuid support are hesitant to add v7 support until it got gets finalised, so for now ULID has more widespread support. They're basically the same, except uuidv7 has a few bits less randomness for UUID fields like version and variant, so I'm sure in 5-10 years the answer will be just use v7, but for the time being, for those use cases I'd stick to ULID.