PostgreSQL image with the pgx_ulid extension pre-installed.
# Pull the image
docker pull ghcr.io/yehezkieldio/pg-ulid:latest
# Start a container
docker run --name pg-ulid -e POSTGRES_PASSWORD=secret -p 5432:5432 -d ghcr.io/yehezkieldio/pg-ulid-- Enable the pgx_ulid extension
CREATE EXTENSION IF NOT EXISTS pgx_ulid;
-- Generate a single ULID
SELECT gen_ulid();
-- In a table, use it as a default value for a primary key with a ULID type
CREATE TABLE users (
id ulid NOT NULL DEFAULT gen_ulid() PRIMARY KEY,
name text NOT NULL
);Refer to the pgx_ulid repository for more details on how to use the extension.
| Tag | PostgreSQL | pgx_ulid |
|---|---|---|
latest |
17 | 0.2.0 |
This project includes a test suite using pgTAP and Docker Compose. To run the tests, use just:
just testThis project is licensed under the MIT License.