← All projects
Project record1 mention
Originally shared on Hacker News

Postgres native UUID-derivation function

A Postgres native function that derives UUIDs from an integer primary key using AES intrinsics, allowing public UUID keys to be exposed while the database keeps using an efficient 64-bit sequential primary key.

Last shared
01 / The problem

What it addresses

Exposing public UUID keys without giving up the efficiency of a 64-bit sequential primary key.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Postgres native UUID-derivation function

    A Postgres native function that derives UUIDs from an integer primary key using AES intrinsics, allowing public UUID keys to be exposed while the database keeps using an efficient 64-bit sequential primary key.

    Problem: Exposing public UUID keys without giving up the efficiency of a 64-bit sequential primary key.

    Posted by @zarzavat · Original source ↗

    Source text · @zarzavat · · Source ↗

    Today I'm writing a Postgres native function to derive UUIDs from an integer primary key using AES intrinsics. This lets me expose public UUID keys while still using an efficient 64-bit sequential primary key.