cockroachdb / cockroach

CockroachDB - the open source, cloud-native distributed SQL database.
https://www.cockroachlabs.com
Other
29.53k stars 3.7k forks source link

Add support for uuid7 #97557

Open jaysonsantos opened 1 year ago

jaysonsantos commented 1 year ago

Is your feature request related to a problem? Please describe. In order to have unique IDs that are sortable and do not expose machine's information (MAC address on uuid 1), it would be nice to support uuid v7 in the uuidgenerate* functions.

Describe the solution you'd like A new function uuid_generate_v7 which conforms with the draft spec

Describe alternatives you've considered One can generate that uuid outside of cockroachdb and use in an uuid field, but there is no way to add as default for a column.

Jira issue: CRDB-24758

blathers-crl[bot] commented 1 year ago

Hello, I am Blathers. I am here to help you get the issue triaged.

I have CC'd a few people who may be able to assist you:

If we have not gotten back to your issue within a few business days, you can try the following:

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

blathers-crl[bot] commented 1 year ago

cc @cockroachdb/replication

rafiss commented 1 year ago

Thanks for the issue! As a workaround until it's added, you might be able to achieve this using a user-defined function. See https://www.cockroachlabs.com/docs/stable/create-function.html

kibertoad commented 2 months ago

@rafiss Btw, spec is going to be published any moment now, so it should be pretty safe to implement it. No changes to the format are going to happen anymore. See https://www.rfc-editor.org/auth48/rfc9562

kibertoad commented 2 months ago

Update: RFC 9562 was published: https://www.rfc-editor.org/info/rfc9562

gnat commented 1 month ago

When this goes in, it would be nice if uuid_generate_v7() could bypass quorum checks similar to gen_random_uuid()