logoalt Hacker News

qntmfredlast Monday at 7:58 PM1 replyview on HN

you may be interested in this postgres extension as well

https://github.com/blitss/typeid-postgres


Replies

K0nservyesterday at 12:12 AM

That is indeed interesting.

I have slightly different goals for my version. I want everything to fit in 128 bits so I'm sacrificing some of the random bits, I'm also making sure the representation inside Postgres is also exactly 128 bits. My initial version ended up using CBOR encoding and being 160 bits.

Mine dedicates 16 bits for the prefix allowing up to 3 characters (a-z alphabet).