cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.18k stars 3.81k 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 6 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 6 months ago

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

gnat commented 5 months ago

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

z0mb1ek commented 1 month ago

wait it too