A lightweight and fast PostgreSQL client extension for Visual Studio Code.
Built for developers and operators who work with SQL every day. This extension focuses on essential features without unnecessary complexity.
- Direct connection only — Connects directly from your machine to your database. No third-party servers, no proxies, no middlemen.
- Your data stays yours — Zero data collection, zero telemetry, zero external API calls. Your queries and data never leave your local environment.
- Secure credential storage — Passwords are stored in VS Code's built-in Secret Storage, not in plain text config files.
- Works with AI coding assistants — Fully compatible with Cursor, Antigravity and other AI-powered editors built on VS Code.
- Leverage AI autocomplete — Write SQL queries faster with AI-powered code completion and suggestions.
- Stay in your workflow — No need to switch between tools. Write, execute, and iterate on queries all in one place.
- Save multiple database connections
- Secure password storage using VS Code's Secret Storage
- Connect/disconnect from the sidebar
- Quick connect via connection string
- Execute SQL queries with
Cmd+Enter(Mac) /Ctrl+Enter(Windows/Linux) - Document-specific connection binding
- Auto-limit SELECT queries to 100 rows (with "View More" for incremental loading)
- Cancel long-running queries with Cancel button or
PostgreSQL: Cancel Querycommand - SQL comment stripping before execution
- Confirmation dialog for data modification queries (INSERT, UPDATE, DELETE, etc.)
- Browse schemas, tables, and views
- View table structure, indexes, foreign keys, and constraints
- View table DDL
- Copy table names
- Quick "SELECT TOP 100" query generation
- View results in a data grid
- Pagination for large result sets (efficiently handles 90,000+ rows)
- Export to CSV or JSON
- View selected rows as JSON
- Edit data inline (with NULL button support)
- Add/delete rows
- Save changes back to database
- View active database sessions
- Cancel running queries (pg_cancel_backend)
- Terminate sessions (pg_terminate_backend)
- Auto-refresh with configurable interval
- Track executed queries
- Re-open queries from history
- Auto-completion for tables and columns
- Hover information for tables
- SQL formatting
- Open VS Code
- Go to Extensions (
Cmd+Shift+X/Ctrl+Shift+X) - Search for "Lightweight PostgreSQL Client"
- Click Install
Or install directly: VS Code Marketplace
- Open VSCodium or compatible editor
- Go to Extensions
- Search for "Lightweight PostgreSQL Client"
- Click Install
Or install directly: Open VSX Registry
code --install-extension lightweight-pgsql-client-x.x.x.vsix- Open the PostgreSQL sidebar (database icon in Activity Bar)
- Click "+" to add a new connection
- Enter connection details or paste a connection string
- Connect to the database
- Open a
.sqlfile or create a new query - Execute with
Cmd+Enter/Ctrl+Enter
| Command | Mac | Windows/Linux |
|---|---|---|
| Execute Query | Cmd+Enter |
Ctrl+Enter |
- VS Code 1.85.0 or higher
- PostgreSQL database
pgsql.maxRows: Maximum number of rows to fetch (default: 1000)pgsql.queryTimeout: Query timeout in milliseconds (default: 30000)
See GitHub Issues
- Added extension icon
- Added screenshots to README
- Documented AI coding assistant compatibility (Cursor, Antigravity, etc.)
- Added Open VSX installation instructions
- Added VS Code Marketplace and Open VSX badges
- Session management panel - view active sessions, cancel queries, terminate sessions
- Cancel button in editor title bar (shows only when query is running)
- Pagination for large result sets - efficiently handles 90,000+ rows
- "View More" button for incremental loading (100 rows at a time)
- Query cancellation support
Initial release:
- Connection management with secure password storage
- SQL query execution with document-specific connections
- Schema explorer with table info view
- Query results with inline editing
- Export to CSV/JSON
- Query history
- SQL auto-completion and formatting
MIT


