Closed grandinj closed 1 month ago
What do you mean by a new data type? Our UUID
data type can store values of all types.
RANDOM_UUID()
function generates values with version (type) 4. java.util.UUID.randomUUID()
has different implementation, but it also generates values of the same type.
In the most cases values are produced by JPA or by other persistence framework.
Anyway, we can create a new function or add an optional parameter to existing RANDOM_UUID()
function to provide a built-in generator of UUIDs with different versions.
Anyway, we can create a new function or add an optional parameter to existing
RANDOM_UUID()
function to provide a built-in generator of UUIDs with different versions.
Good point.
A newer draft specification: https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis
Improves performance when UUID is being used as primary key.
Spec https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format Discussion https://news.ycombinator.com/item?id=28088213