Skip to content

Make higher precision v7 timestamps use 10 bits on platforms with microsecond precision #814

@KodrAus

Description

@KodrAus

See: #809 (comment)

In PostgreSQL, UUID V7 generation uses the rand_a field for an extra 12 bits of sub-millisecond timestamp precision. Some platforms don't generate timestamps with enough precision to fill that 12 bits though. In those cases, we can instead fill 10 bits, and leave another 2 free for random data.

This should be fairly straightforward to support in ContextV7, since additional precision is already pluggable and not fixed at 0 or 12 bits.

cc @sergeyprokhorenko

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions