SQL editor
Query your Plexivo Postgres from the console, read-only by default, with write mode for data changes and tables when you need it.
The SQL editor tab runs SQL against your Plexivo Postgres from the console, with nothing to install. It is read-only until you choose otherwise, and every run is recorded in your organisation’s activity log.
Run a query#
- Open the SQL editor tab of your database. The Schemas list beside it shows your tables.
- Write one statement, for example
select * from orders order by created_at desc limit 50. - Choose Run, or press ⌘+Enter (Ctrl+Enter on Windows and Linux). Cancel stops a long query.
Reads run in a read-only transaction that is rolled back afterwards, so a query can never change your data by accident. Results show up to 1,000 rows.
Write mode#
Tick Write mode to change data or tables. The status changes from Read-only to Changes will commit, and Review and run asks you to confirm with Run and commit. Write mode runs:
insert,update,delete,mergeandtruncate;create,alteranddropwhen the next word istableorindex: for examplecreate table,alter table … enable row level security,create indexanddrop index.
Other forms are refused, even when they make a table or an index: for example create unique index and create temporary table. Run those over a direct connection (see below).
Limits#
- One statement per run, of up to 100,000 bytes.
- Each run has 15 seconds.
- Up to 1,000 rows or 2 MB of results are shown.
- Roles, server settings, extensions, functions, views, policies and transaction control are not run here, nor functions that reach outside the database, such as
dblink.
For everything else#
To create policies, functions, views or extensions, or to run a migration with many statements, connect as your database’s app user:
- From your laptop, with
psqlover the Plexivo CLI tunnel:plexivo db connect orders-db. See Connect. - From your server, with your usual migration tool and the connection string.
- From your server, with the client library and the secret key, which runs SQL and versioned migrations.
const server = createClient(PLEXIVO_DATA_URL, process.env.PLEXIVO_SECRET_KEY, { persistSession: false });
await server.migrate([
{ id: '2026_10_27_01_notes_policy',
up: `create policy "Each user owns their notes" on notes
for all to authenticated
using (owner = auth.uid()) with check (owner = auth.uid())`,
down: 'drop policy "Each user owns their notes" on notes' }
]);Next steps#
Updated 27 October 2026