Hacker News new | past | comments | ask | show | jobs | submit login

Not a dumb question, I think you've hit on a key oddity here.

This article is about MySQL, apparently it's really the case in MySQL?

It's not the case in every rdbms universally. Postgres has a uuid type that stores them how you would (rightfully) expect.

I have no idea why MySQL does it this way, it does seem odd.




MySQL doesn't have a UUID type, so naive implementations use (VAR)CHAR. Those in the know use BINARY(16) and MySQL 8 now has helper functions to convert to and from hex. Apparently MariaDB will soon have a native UUID type. PostgreSQL has had them from for years.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: