PostgreSQL · online compiler

Run PostgreSQL online

Run PostgreSQL 17 online — real server, sample schema, no setup.

Firecracker microVM live per-test verdicts multi-file compile

PostgreSQL is the SQL database the industry defaults to when correctness, concurrency, and features matter — CTEs, window functions, JSONB, full-text search, generated columns, partitioning, and strict type enforcement.

ls-judge runs a real PostgreSQL 17 server inside a Firecracker microVM. Every submission gets its own cluster seeded with a `playground` database (users + orders fixtures); each run is ephemeral — writes vanish when the VM dies, so you can CREATE, INSERT and DROP freely.

Starter code

What you get in PostgreSQL

Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.

postgresql
PostgreSQL 17
SELECT 'Hello, World!';
stdin →(empty)
expected → ?column? --------------- Hello, World! (1 row)
FAQ

Common questions about PostgreSQL on ls-judge

Which version?
PostgreSQL 17 — the current stable major (released Sept 2024).
Pre-loaded data?
Yes — database `playground` with tables users(id, name, email) and orders(id, user_id, total, placed_at). Drop and recreate as you like.
Persistent DB?
No — the cluster is destroyed when the VM is torn down. Great for safe experimentation.
Extensions?
Only what ships with the Alpine postgresql17 package (standard contrib — pg_stat_statements, pgcrypto, etc.). No pgvector in v1.
Free?
Yes.
Further reading
Also try