pg-explorer-vsce
A Visual Studio Code extension for browsing and querying PostgreSQL databases, inspired by Beekeeper Studio and IntelliJ's database tools

- Connection management — add by pasting a
postgresql:// or JDBC URL, or by entering details; edit any setting from a one-screen menu; passwords in VS Code secretStorage.
- Object browser — lazy tree of connections → databases → schemas → tables (partitioned included) / views (materialized included) / foreign tables / sequences / types / functions.
- Details dashboards — double-click a connection, database, schema, object group, or table/view (or use its dashboard icon / Show Details) for an editor-area page of cards and sortable tables: sizes, row estimates, columns, indexes, constraints, incoming foreign keys, with View Data and DDL one click away.
- ERD — a per-schema relationship diagram drawn from foreign keys: zoom, pan, keyboard access, and SVG export.
- Query editor — a SQL editor bound to a connection;
Ctrl+Enter (Cmd+Enter on macOS) to run.
- Results panel — result tabs in the bottom panel with sorting and type-aware column filters (server-side above a configurable row threshold), pagination, pinning, and in-flight cancellation.
- Diagnostics, history, bookmarks, read-only mode — see FEATURES.md.
📖 FEATURES.md — the full feature list.
📖 USAGE.md — walkthrough and every command.
⚙️ CONFIGURATION.md — settings and the security model (credential storage, TLS, read-only mode).
Requirements
- A PostgreSQL server reachable from your machine.
- VS Code 1.85+ (or Cursor), via the Extension Development Host or an installed
.vsix.
Quick start
- Open the PostgreSQL Explorer view in the Activity Bar and click Add Connection.
- Expand a connection → database → schema, right-click a connection for New Query, then press
Ctrl+Enter.
Click a tree row to expand it; double-click it for its details dashboard. Click the preview icon on a table/view row to open its data. Right-click tables for Preview Data, Count Rows, View/Copy DDL; right-click a connection for Connection Diagnostics (server info + active sessions).
Development
npm install
npm run build # bundle with esbuild
npm run typecheck # type check without emitting
npm test # run unit tests (node --test)
Open the extension Development Host via the Run and Debug view (Run Extension launch config) to test it live.
License
Licensed under the terms in LICENSE (dual license: free for personal use, Pro for commercial use).
| |