5 ms·
I thought uuid-ossp was just a bunch of utilities around uuid parsing and generation. It shouldn’t need anything special from the OS. https://www.postgresql.or
by joevandyk 8y ago
I thought uuid-ossp was just a bunch of utilities around uuid parsing and generation. It shouldn’t need anything special from the OS.
https://www.postgresql.org/docs/9.4/uuid-ossp.html https://www.postgresql.org/docs/9.4/uuid-ossp.html
- the_duke 8y agoThe very first function on that link is for generating uuid v1s, which require the mac address...
- derefr 8y agoA UUIDv1 contains the host's MAC address as a component. And the uuid-ossp extension (or rather, the OSSP's libuuid, which it uses) does indeed read said MAC address when building UUIDv1s: https://github.com/sean-/ossp-uuid/blob/master/uuid_mac.c https://github.com/sean-/ossp-uuid/blob/master/uuid_mac.c Keep in mind, if you're using uuid-ossp rather than just relying on Postgres's built-in gen_random_uuid() function, it's very likely because you want to generate UUIDv1s instead of UUIDv4s (as they're the only two types of UUIDs that see much use.) So this functionality is pretty essential to the extension—a version of the extension without it wouldn't be worth much.