Postgres Playground
Run real PostgreSQL in the tab, with CTEs, window functions, and `jsonb` included.
- Your draft is kept in this tab's session storage and cleared when the tab closes.
Draft kept in this tab
Your draft is kept in this tab's session storage and cleared when the tab closes. - Processing happens in this page. No application server receives your input.
Runs in your browser
Processing happens in this page. No application server receives your input.
Schema
No tables in public schema.
SQL query
Result
Enter a PostgreSQL query or load the sample script, then click Run query.
What this tool does
Runs real PostgreSQL compiled to WebAssembly inside an isolated Web Worker in your browser tab. Common table expressions (CTEs), window functions, jsonb operators, generate_series, and PostgreSQL's query planner execute locally in linear WASM memory with zero network connections.
Multi-statement scripts show one result per statement, in submission order, in the Result sheet. For example, running create table t(id int, tags jsonb); insert into t values (1,'["a","b"]'); select id, jsonb_array_length(tags) from t; shows three results and lists table t in the Schema sheet.
Limits
In-memory only. Nothing is written to disk, nothing survives a reload, and there is no connection to any server: this is Postgres compiled to WebAssembly, not a client. No COPY FROM a path, no dblink, no postgres_fdw, no superuser-only extensions. Results are capped at 10,000 rows for display; export is not. Cancelling a query destroys the database.
Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.