Blogmark

Short alphanumeric pseudo random identifiers in Postgres

via jbranchaud@gmail.com

https://andyatkinson.com/generating-short-alphanumeric-public-id-postgres
PostgreSQL

I’ve had to add this style of identifier to many apps that I’ve worked on, e.g. for something like coupon codes. I end up with a bespoke solution each time, usually in app code. It’s cool to see a robust solution like this at the database layer by adding a couple functions.