Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UUID7 as alternative UUID type #4005

Open
grandinj opened this issue Feb 18, 2024 · 2 comments
Open

Add UUID7 as alternative UUID type #4005

grandinj opened this issue Feb 18, 2024 · 2 comments

Comments

@grandinj
Copy link
Contributor

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

@katzyn
Copy link
Contributor

katzyn commented Feb 18, 2024

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.

@grandinj
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants