cuid2 VS pg_idkit

Compare cuid2 vs pg_idkit and see what are their differences.

cuid2

Next generation guids. Secure, collision-resistant ids optimized for horizontal scaling and performance. (by paralleldrive)

pg_idkit

Postgres extension for generating UUIDs (by VADOSWARE)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
cuid2 pg_idkit
15 8
1,849 308
6.2% 5.2%
4.1 8.6
2 months ago about 2 months ago
JavaScript Rust
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

cuid2

Posts with mentions or reviews of cuid2. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-11.

pg_idkit

Posts with mentions or reviews of pg_idkit. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-23.
  • Shrink UUIDs with PostgreSQL or Ruby
    2 projects | dev.to | 23 Feb 2024
    Unfortunately, as of PostgreSQL 16, UUIDv7 are not yet supported out of the box. For the time being, use an extension such as pg_uuidv7 or pg_idkit to generate UUIDv7 e.g. as default primary key when you CREATE new records.
  • UUIDv7 is coming in PostgreSQL 17
    5 projects | news.ycombinator.com | 5 Feb 2024
    If you like this (I do very much), you might also like pg_idkit[0] which is a little extension with a bunch of other kinds of IDs that you can generate inside PG, thanks to the seriously awesome pgrx[1] and Rust.

    [0]: https://github.com/VADOSWARE/pg_idkit

    [1]: https://github.com/pgcentralfoundation/pgrx

  • Pg_idkit: A Postgres extension for generating popular UUIDs
    2 projects | news.ycombinator.com | 19 Dec 2023
  • Bye Sequence, Hello UUIDv7
    8 projects | news.ycombinator.com | 1 Oct 2023
    Yup this is one of the reasons I put together a light extension for this:

    https://github.com/VADOSWARE/pg_idkit

    There are a lot of options for UUID extensions (lots of great pure SQL ones!), but I wanted to get as many ID generation strategies in one place

    Also note that native UUID v7 is slated to land in pg17:

    https://commitfest.postgresql.org/44/4388/

  • Pg_idkit: Postgres Extension for Generating UUIDs
    1 project | news.ycombinator.com | 20 Jan 2023
  • ULIDs and Primary Keys
    3 projects | news.ycombinator.com | 29 Dec 2022
    https://github.com/ulid/spec/issues

    I went through this exploration a while back for a new project and decided on uuidv7s, which are binary compatible with ULIDs but will likely find more support as they get added to the original UUID RFC.

    Either UUIDv7 or XIDs seem like better choices than ULIDs for new projects.

    * Supabase on different primary key considerations: https://supabase.com/blog/choosing-a-postgres-primary-key

    * Postgres extension for generating various kinds of IDs: https://github.com/VADOSWARE/pg_idkit

  • Introducing pg_idkit: A Postgres extension for generating UUIDs
    1 project | /r/PostgreSQL | 19 Sep 2022
    I also made an issue in the repo so eventually I should get to expanding the benchmark set as well.

What are some alternatives?

When comparing cuid2 and pg_idkit you can also consider the following projects:

postgresql-uuid-generate-v7

ksuid - K-Sortable Globally Unique IDs

diesel - A safe, extensible ORM and Query Builder for Rust

dxid - A better and safer way to display your primary keys in urls or in your app

cube.js - 📊 Cube — The Semantic Layer for Building Data Applications

nanoid - A tiny (124 bytes), secure, URL-friendly, unique string ID generator for JavaScript

typeid - Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs

pgx - Build Postgres Extensions with Rust! [Moved to: https://github.com/tcdi/pgrx]

cuid2 - Next generation GUIDs. Collision-resistant ids optimized for horizontal scaling and performance.

readyset - Readyset is a MySQL and Postgres wire-compatible caching layer that sits in front of existing databases to speed up queries and horizontally scale read throughput. Under the hood, ReadySet caches the results of cached select statements and incrementally updates these results over time as the underlying data changes.