Docs
Browser & PGLite

In-browser SQL editor

The Silos Console SQL editor runs a real PostgreSQL engine (PGLite) client-side, so you can write and run SQL with zero setup.

The Silos Console includes a SQL editor and playground that runs PGLite — real PostgreSQL compiled to WASM — directly in your browser. Queries execute client-side, so there's no provisioning step and no network round-trip to try things out.

What you can do

  • Write and run arbitrary SQL — CREATE TABLE, INSERT, SELECT, transactions, the full standard surface.
  • Prototype a schema interactively before deploying it to a Silos database.
  • Explore data and iterate on queries with immediate, in-process results.
Try it in the editor
create table todos (
  id      serial primary key,
  title   text not null,
  done    boolean not null default false,
  created timestamptz not null default now()
);

insert into todos (title) values ('Try the Silos SQL editor'), ('Deploy to an edge database');

select * from todos where done = false order by created;

Because the engine is genuine Postgres, features like JSON/JSONB, CTEs, window functions, views, and PL/pgSQL work the same way they do on a deployed database.

JSONB and a window function, all client-side
create table events (id int, payload jsonb);
insert into events values (1, '{"kind":"click"}'), (2, '{"kind":"view"}'), (3, '{"kind":"click"}');

select
  payload->>'kind' as kind,
  count(*)         as n,
  rank() over (order by count(*) desc) as rnk
from events
group by payload->>'kind';

Editor vs. deployed database

The SQL editor runs PGLite (PostgreSQL 16-based) in your browser. A deployed Silos database runs the server engine (PostgreSQL 18) over the wire protocol. For the vast majority of SQL these behave identically — but if you depend on version-specific behavior, validate against a real Silos database, which is the source of truth. See PGLite overview.

Persisting your work

By default an in-browser database lives in memory for the session. To keep it across reloads, PGLite can persist to browser storage — see Persistence.

From editor to deployment

When your schema is ready, create a real database and apply it:

  • Create a database in the Console or with the CLI.
  • Connect with psql or your driver — see Connecting.

On this page