pg_base62
Encode UUID values to URL-safe Base62 strings and decode them back.
pg_base62 · Encode UUID values to URL-safe Base62 strings and decode them back.
Overview
Usage
Sources:
- Official upstream README
- Official extension control file (pg_base62.control)
- Official implementation source
pg_base62 — A PostgreSQL extension for encoding UUIDs to Base62 alphabet and decoding Base62 back to UUID. It is built in Rust with pgrx. Use it for the corresponding SQL or database utility workflow. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
base62_decodeis an extension function.base62_encodeis an extension function.
Requirements and Caveats
- The catalog records version
0.1.0. - The control file marks the extension as non-relocatable.
- The control file requires a superuser for installation.
- The control file marks the extension as not trusted.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.