On Thursday I learned about ulid[0] which I think really neatly solves the problem of text representation for UUID v7. However, I also like the idea of prefixed ids, although I haven't used them in anger.
Yesterday I built most of a Postgres extension, using the excellent pgrx[1] project, that build on ulid to add prefixes. With it you get something like this
Comments (1,468) 897 threads
Show all comments
Showing thread 105 of 897
Yesterday I built most of a Postgres extension, using the excellent pgrx[1] project, that build on ulid to add prefixes. With it you get something like this
The aim is for it to be the same size as a UUID in storage, but I haven't quite gotten there yet.I haven't pushed it to GitHub yet, but it's fairly done at this point.
0: https://github.com/ulid/spec
1: https://github.com/pgcentralfoundation/pgrx