pg_uuidv7
Create UUIDv7 values in postgres
pg_uuidv7 : Create UUIDv7 values in postgres
Overview
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | sequential_uuids snowflake pg_idkit pgx_ulid pg_uuid_v8 uuid-ossp typeid permuteseq |
Packages
| Linux / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| el8.aarch64 | N/A | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| el9.x86_64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| el9.aarch64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| el10.x86_64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| el10.aarch64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| d12.x86_64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| d12.aarch64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| d13.x86_64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| d13.aarch64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| u22.x86_64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| u22.aarch64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| u24.x86_64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| u24.aarch64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| u26.x86_64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
| u26.aarch64 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 | PGDG 1.7.0 |
Source
github.com/fboulnois/pg_uuidv7
pg_uuidv7-1.7.0.tar.gz
Install
Make sure PGDG repo available:
Install this extension with pig:
Create this extension with:
Usage
Functions
| Function | Description |
|---|---|
uuid_generate_v7() |
Generate a new UUIDv7 |
uuid_v7_to_timestamptz(uuid) |
Extract the timestamp from a UUIDv7 |
uuid_timestamptz_to_v7(timestamptz [, bool]) |
Convert a timestamp to a UUIDv7 (set second arg to true to zero the random bits) |