{"repo":"fboulnois/pg_uuidv7","free":true,"listed":false,"github":"https://github.com/fboulnois/pg_uuidv7","clone":"git clone https://github.com/fboulnois/pg_uuidv7.git","description":"A tiny Postgres extension to create version 7 UUIDs","language":"C","stars":429,"topics":["c","libpq","postgres","postgresql","uuidv7","postgresql-extension","uuid","uuid-generator"],"license":"MPL-2.0","category":"databases-storage","readme_excerpt":"pg uuidv7 : Use the new v7 UUIDs in Postgres [!NOTE] As of Postgres 18, there is a built in uuidv7() function, however it does not include all of the functionality below. A tiny Postgres extension to create valid version 7 UUIDs in Postgres. Supports Postgres 13 through 18. These are regular Postgres UUIDs, so they can be used as primary keys, converted to and from strings, included in indexes, etc: The timestamp component of these UUIDs can be extracted: Timestamps can be converted to v7 UUIDs: uuid generate v7() is as fast as the native gen random uuid() function. See the benchmarks for more details. Background Version 7 UUIDs have a few advantages. They include a 48-bit Unix timestamp with millisecond accuracy and will overflow far in the future (10899 AD). They also include 74 random bits which means billions can be created every second without collisions. Because of their structure they are globally sortable and can be created in parallel in a distributed system. Quickstart [!IMPORTANT] These instructions are for x86 64 Linux. On other architectures (e.g. Apple M1, Raspberry Pi, etc.) follow the build instructions instead. 1. Download the latest .tar.gz release and extract it to a temporary directory 2. Copy pg uuidv7.so for your Postgres version into the Postgres module directory 3. Copy pg uuidv7--1.7.sql and pg uuidv7.control into the Postgres extension directory 4. Enable the extension in the database using CREATE EXTENSION pg uuidv7; Build Build locally pg uuidv7 on","default_branch":null,"files":null,"tree":[],"storefront":"/r/fboulnois","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fboulnois/pg_uuidv7/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}