2 ms·
What does 128-bit compatibility with UUID mean? I would expect that it will be interoperability on binary level (e.g. allowing to store ULID in database columns
by ivan_gammel 8y ago
What does 128-bit compatibility with UUID mean? I would expect that it will be interoperability on binary level (e.g. allowing to store ULID in database columns of UUID type), but UUID has type information encoded in it - how can ULID address this requirement?
- BugsJustFindMe 8y agoedit: you're right. my bad. <strike>UUID4 is just a 128 bit random number.</strike> That just means they also generate 128 bits.
- ivan_gammel 8y agoYou are wrong, please, check the specification. UUID4 is 122 bit random number + 6 bits for variant and version.
- groestl 8y agoUUID has version and variant information encoded, but there are no fixed bits. So all 128bit numbers are potentially valid UUIDs. For forward compatibility, a database UUID type will set the correct bits when generating a UUID (v4), but many implementations will not check the version/variant flags while processing UUIDs.