SQL editor
The editor is built on Monaco (the same engine as VS Code), tuned for PostgreSQL: autocomplete for tables/columns/functions, formatting via sql-formatter, multi-cursor, error highlighting before run.
Open an editor tab
- The + New button in the editor tabs.
- Double-click a table in the schema tree → opens a
SELECT * FROM ... tab.
- From history — double-click a query, copies it into a new tab.
Running queries
| Action |
Shortcut |
| Run the current statement (where the cursor is) |
⌘+Enter |
| Run only the selection |
⌘+Shift+Enter |
| EXPLAIN current statement |
⌘+E |
| EXPLAIN ANALYZE |
⌘+Shift+E |
If a tab has multiple SELECTs separated by ;, ide99 runs the one with the cursor in it. To run all — select everything (⌘+A) and ⌘+Shift+Enter.
Autocomplete
Triggered by Ctrl+Space and automatically as you type.
Suggests:
- Tables — from the current schema and the
search_path.
- Columns — after
SELECT, after a table name (orders.<TAB>), inside WHERE/GROUP BY/ORDER BY.
- Functions — built-in (count, now, jsonb_path_query, …) and user-defined from the current schema.
- JSONB paths — if schema scanning is on, after
data-> it suggests real keys (e.g., 'flags', 'channel').
- SQL keywords.
The schema tree and autocomplete refresh on connect and via ⌘+R. If you create a table from another client — hit Refresh.
Formatting
⌘+Shift+F formats the current query. Under the hood — sql-formatter with a Postgres preset:
-- before
select id,name from users where created_at > now()-interval '7 days' order by id desc
-- after
SELECT
id,
name
FROM users
WHERE created_at > now() - interval '7 days'
ORDER BY id DESC
Settings (indent, keyword case) are in Settings → General.
Multi-cursor
Same as VS Code:
| Action |
Shortcut |
| Add cursor at next match |
⌘+D |
| Add cursor above / below |
⌘+Alt+↑ / ↓ |
| Add cursor on click |
Alt+click |
| Add cursor at all matches |
⌘+Shift+L |
Comments
| Action |
Shortcut |
Toggle line comment (--) |
⌘+/ |
Toggle block comment (/* */) |
⌘+Shift+/ |
Error highlighting
If there's a syntax error, Monaco underlines it red before you run. If you ran and Postgres returned an error — a modal shows:
- The server error message
- Plain English explanation — translates SQLSTATE to human language ("UNIQUE index on email already has this value" instead of "23505")
- The line is highlighted in the editor
Details: Troubleshooting.
Tip: using parameters
Postgres extension psql's \set doesn't work in regular clients, but WITH does:
WITH params AS (
SELECT
50000 AS customer_id_min,
interval '7 days' AS recent
)
SELECT count(*) FROM events e, params p
WHERE e.customer_id > p.customer_id_min
AND e.event_at > now() - p.recent;
Gives you "parameters" in one place and easy to edit.
Next