Press Run to execute CREATE, INSERT and SELECT. Results appear as tables here.
IdlePress Run (Ctrl+Enter). PostgreSQL loads only when needed.
PostgreSQL usage & limits
Real PostgreSQL via PGlite. Multi-statement SQL, JSONB, window functions and database changes work in this tab. Each statement produces its own output. Run executes the file selected in Options → Entry file. Stop resets the database. Data is separate from your account and Supabase. Five-second execution limit, 12,000 characters and 200 displayed rows per result. No external database connections.
PostgreSQL online compiler
About this PostgreSQL compiler
Practise PostgreSQL in a real database engine that runs inside your browser. Write multi-statement SQL, create tables, insert and update rows, and see each statement’s result as a table. Your data stays on your device and resets when you stop.
What you can try
- CREATE TABLE, INSERT, UPDATE, DELETE and SELECT scripts
- JSONB columns and the ->> operator
- Window functions, CTEs, joins and aggregates
- ON CONFLICT upserts and constraints
PostgreSQL exercises and challenges · Coding practice · All online compilers
Frequently asked questions
Is this real PostgreSQL?
Yes. It uses PGlite, a WebAssembly build of PostgreSQL, so PostgreSQL syntax and behaviour apply rather than a SQLite approximation.
Does my data persist?
Changes last while the tab is open. Pressing Stop resets the disposable database. Your SQL files can be saved on this device or exported.
Can I connect to my own database?
No. It is a single-connection sandbox with no external connections. Use psql or Docker locally for your own server.
What are the limits?
Five seconds per run, 12,000 characters of SQL and 200 displayed rows per result.