Does Postgres (or a Postgres extension) have a uuid v5 function (ie one that takes in a UUID name space and a string to produce a new UUID)?
If not a native function, how would one write this function?
Does Postgres (or a Postgres extension) have a uuid v5 function (ie one that takes in a UUID name space and a string to produce a new UUID)?
If not a native function, how would one write this function?
Yes, uuid-ossp module provides such function.
uuid_generate_v5(namespace uuid, name text)
This function generates a version 5 UUID, which works like a version 3 UUID except that SHA-1 is used as a hashing method. Version 5 should be preferred over version 3 because SHA-1 is thought to be more secure than MD5.
© 2022 - 2024 — McMap. All rights reserved.