{"repo":"elitan/postgres-nanoid","free":true,"listed":false,"github":"https://github.com/elitan/postgres-nanoid","clone":"git clone https://github.com/elitan/postgres-nanoid.git","description":"Beautiful IDs for PostgreSQL like `cus_V1StGXR8`, `ord_K3JwF9Hg`, `user_9LrfQXpA`","language":"PLpgSQL","stars":68,"topics":["ids","nanoid","postgres","stripe"],"license":null,"category":"databases-storage","readme_excerpt":"PostgreSQL Nanoid Secure, URL-safe unique identifiers for PostgreSQL. Simple, fast, works everywhere. Installation Click to expand installation SQL (copy-paste ready) Works on all Postgres providers: - AWS RDS, Google Cloud SQL, Azure Database, etc - Self-hosted Postgres (v12+) - Requires pgcrypto extension (available on most managed providers) Quick Start Why Nanoids Feature Auto-increment UUID Nanoid ------------------- ----------------- ------------- ------------ Secure No (reveals count) Yes Yes Length Variable 36 chars 21 chars URL-friendly Yes No (dashes) Yes Distributed No Yes Yes Performance Fast Slower Fast Performance - Fast generation (100K+ IDs/sec) - Memory efficient - No coordination needed across distributed systems Usage Basic examples Production tables Size calculation: Default size 21 with prefix cus (4 chars) = 17 random characters Tips: - UNIQUE on public id is enough - no extra index needed - CHECK constraints with regex are fast, use them for prefix validation Batch generation Parameters - prefix (text, default '' ) - String prepended to ID - size (int, default 21 ) - Total length including prefix - alphabet (text, default 0-9a-zA-Z ) - 62 URL-safe chars, must be 2-255 chars - additionalBytesFactor (float, default 1.02 ) - Buffer multiplier for efficiency Custom alphabets Time-Sorted IDs (Advanced) For cases where you need lexicographic time ordering (audit logs, event streams), there's nanoid sortable() . This embeds a timestamp in the ID, which reveals","default_branch":null,"files":null,"tree":[],"storefront":"/r/elitan","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/elitan/postgres-nanoid/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."}