Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

To take advantage of native UUID support in a database, e.g. PostgreSQL stores them in 128 bits. Also every UUID carries version number so minimal formating needs to be performed to comply with the standard.


So you're saying Postgres actually wastes cycles verifying the version information and doesn't treat UUID just as a 16 byte opaque structure?


Well, there's the "input format" (or rather two), which gets parsed into the internal representation. The input format can be either hex text, which allows dashes in some positions, or binary, in which it's just a bytearray. There's no verification otherwise, unless you treat generation of UUIDs, which allows to specify the type, as such.


Second point: Verifying version information would hardly matter cyclewise.




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

Search: