# Will your app run on Stolon?

> Point the compatibility gate at your own schema and queries. It reports which statements will not run here, with the SQLSTATE and the reason, before you move anything.

Source: https://stolondb.com/compatibility/ · Page title: Will your app run on Stolon? The compatibility gate

Point the compatibility gate at your own schema and queries before you move anything.

## Run it

**On the hosted service**, load your schema into a branch and run your queries there. Nothing reaches `main`:

```
# 1. a branch to probe in, and your schema in it
$ psql "postgresql://app:<password>@db.stolondb.com/acme.main" -c 'CREATE DATABASE probe'
$ pg_dump --schema-only "$DATABASE_URL" | psql "postgresql://app:<password>@db.stolondb.com/acme.probe"

# 2. your queries — a log, an ORM dump, a file you wrote by hand
$ psql "postgresql://app:<password>@db.stolondb.com/acme.probe" -f queries.sql
```

Any statement that won't run is refused with its SQLSTATE and the reason.

## What works

| Area | Status | Notes |
| --- | --- | --- |
| Ordinary CRUD, joins, CTEs, aggregates, transactions | supported | the bulk of most applications |
| Constraints: NOT NULL, UNIQUE, CHECK, foreign keys | supported | enforced |
| Roles, GRANT/REVOKE, row-level security | supported | policies branch with the schema |
| Upserts: `ON CONFLICT (email) DO UPDATE` | supported | on the primary key or any unique column |
| String functions: `left`, `substring`, `replace`, `concat`, `lpad`, `split_part`… | supported | also `format`, `md5` and regular expressions |
| Dates: `now() - interval '7 days'`, `extract`, `date_trunc`, `to_char` | supported | also `interval` columns, `AT TIME ZONE` and `SET TIME ZONE` |
| Window functions: `row_number`, `rank`, `lag`, `sum(x) OVER (…)` | supported | named windows and `ROWS`, `RANGE` and `GROUPS` frames |
| JSON: `->`, `->>`, `@>`, `\|\|`, `jsonb_set`, `jsonb_build_object`, `json_agg` | supported | including whole rows: `row_to_json(t)` |
| Enum types, schemas, partial indexes | supported | reflected the way ORMs expect |
| PL/pgSQL functions, procedures, triggers | supported | also `DO` blocks and `CALL` |
| Extensions: `vector`, `pgcrypto`, `citext`, `hstore`, `pg_trgm`, `uuid-ossp` | supported | pgvector with `ivfflat` and `hnsw`; also `unaccent`, `fuzzystrmatch` |
| psql's `\d` metacommands | works | `\dt`, `\d`, `\di`, `\df`, `\du` and more |

The full surface is in [the docs](https://stolondb.com/docs/).

Gate came back green? The next step is a database.

[Start free](https://stolondb.com/signup)

- [Get a database](https://stolondb.com/start/) — Rehearse, start here, or move here.
- [Docs](https://stolondb.com/docs/) — Merge, branch verbs, durability and auth.
