PgStudio is a comprehensive PostgreSQL database management extension featuring interactive SQL notebooks, real-time monitoring dashboard, AI-powered assistance, and advanced database operations—all within VS Code.
| Feature | Description |
|---|---|
| 🔌 Secure Connections | Manage multiple connections with VS Code SecretStorage encryption |
| 🛡️ Connection Safety | Environment tagging (🔴 PROD, 🟡 STAGING, 🟢 DEV), read-only mode, query safety analyzer |
| 📊 Live Dashboard | Real-time metrics, active query monitoring, and performance graphs |
| 📓 SQL Notebooks | Interactive notebooks with rich output, AI assistance, and export options |
| 💾 Saved Queries | Tag-based organization, AI metadata generation, connection context restoration, edit & reuse |
| 🌳 Database Explorer | Browse tables, views, functions, types, extensions, roles, and FDWs |
| 🛠️ Object Operations | Full CRUD operations, scripts, VACUUM, ANALYZE, REINDEX |
| 📊 Table Intelligence | Profile, activity monitor, index usage analytics, definition viewer |
| 🔍 EXPLAIN CodeLens | One-click EXPLAIN/ANALYZE with results in notebooks |
| 🛡️ Auto-LIMIT | Automatic query protection with configurable row limits (default 1000) |
| 🌍 Foreign Data Wrappers | Manage foreign servers, user mappings, and tables |
| 🤖 AI-Powered | GitHub Copilot, GitHub Models, OpenAI, Anthropic, and Google Gemini integration |
| ⌨️ Developer Tools | IntelliSense, keyboard shortcuts, PSQL terminal access |
| 📤 Export Data | Export query results to CSV, JSON, or Excel formats |
| 📉 Large result streaming | Optional sliding-window cursor mode for big SELECTs — bounded memory, scroll to fetch |
| 🔢 Binary columns | Configurable bytea display (hex / PostgreSQL / JSON debug) |
| 🤖 SQL Assistant | Regenerate last reply or resend from an earlier user message; prefill when attaching context |
|
|
|
|
|
| Area | PgStudio v1.2.1 | Notes |
|---|---|---|
| Core PostgreSQL object operations | ✅ | Tables, views, mat views, functions, roles, extensions, FDWs, and more |
| AI-assisted SQL workflows | ✅ | Generate, optimize, explain, analyze, and notebook handoff |
| Production safety controls | ✅ | Read-only mode, query risk scoring, confirmation prompts, Auto-LIMIT |
| Real-time monitoring dashboard | ✅ | Activity and performance telemetry in VS Code |
| Interactive SQL notebooks | ✅ | Native .pgsql notebook workflow |
| In-grid editing parity with desktop IDEs | Planned enhancements in v1.x | |
| ERD/schema visualization parity | Under active expansion | |
| Advanced replication administration | Additional publication/subscription workflows planned |
- In-grid editing is currently more limited than full desktop DB IDEs.
- ERD/schema visualization is available but not yet feature-complete.
- Some advanced PostgreSQL admin workflows are partial and are scheduled for incremental v1.x updates.
Navigate your database with an intuitive hierarchical tree view:
📁 Connection
└── 🗄️ Database
└── 📂 Schema
├── 📊 Tables
├── 👁️ Views
├── 🔄 Materialized Views
├── ⚙️ Functions
├── 🏷️ Types
├── 🌍 Foreign Data Wrappers
├── 🧩 Extensions
└── 👥 Roles
Organize, manage, and reuse your most important queries with intelligent tagging and context preservation.
- 🏷️ Tag-Based Organization — Group queries by purpose for instant discovery
- 🔗 Connection Context — Queries remember their original connection, database, and schema
- 📓 One-Click Reopening — Restore queries with full context in a new notebook
- ✏️ In-Place Editing — Modify queries without creating duplicates
- 🤖 AI Metadata Generation — Auto-generate titles, descriptions, and tags
- 📊 Rich Metadata Display — See creation date, usage count, database, and connection at a glance
Leverage AI to write, optimize, and debug your queries faster:
- Smart Completions — Context-aware SQL suggestions
- Query Explanation — Understand complex queries in plain English
- Query Optimization — Get performance improvement suggestions
- Error Detection — Real-time syntax and logical error detection
- Natural Language to SQL — Describe what you need, let AI write the SQL
PgStudio provides a Safe Execution Model for AI interactions.
- Human-in-the-Loop: AI generates the code, but it is never executed automatically. You review it in a notebook cell first.
- Context Control: You decide which tables the AI can see.
Supported AI Providers:
- GitHub Copilot (VS Code LM)
- GitHub Models (GitHub account sign-in)
- OpenAI
- Anthropic Claude
- Google Gemini
Transform your data into insights without exporting to Excel.
- One-Click Charts: Create Bar, Line, Area, and Pie charts from any query result.
- Customizable: Adjust log scales, use varied point styles, and control fill opacity.
- Modern VFX: Enable Glow and Blur effects for stunning, dashboard-ready visuals.
- Custom Endpoints
- Open VS Code → Press
Ctrl+Shift+X - Search for PostgreSQL Explorer
- Click Install
Or install via command line:
code --install-extension ric-v.postgres-explorer- Click the PostgreSQL icon in the Activity Bar
- Click Add Connection or use
Ctrl+Shift+P→PostgreSQL: Add Connection - Enter your connection details and click Save
- Click on your connection to connect and start exploring!
| Object Type | Operations |
|---|---|
| 📊 Tables | View, Edit, Insert, Update, Delete, Truncate, Drop, VACUUM, ANALYZE, REINDEX |
| 👁️ Views | View Definition, Edit, Query Data, Drop |
| 🔄 Materialized Views | Refresh, View Data, Edit, Drop |
| ⚙️ Functions | View, Edit, Call with Parameters, Drop |
| 🏷️ Types | View Properties, Edit, Drop |
| 🌍 Foreign Data Wrappers | Create/Drop Server, User Mappings, Import Schema |
| 🔗 Foreign Tables | View, Edit, Drop |
| 🧩 Extensions | Enable, Disable, Drop |
| 👥 Roles | Grant/Revoke Permissions, Edit, Drop |
| Shortcut | Action |
|---|---|
Ctrl+Enter |
Execute current cell |
Shift+Enter |
Execute and move to next |
F5 |
Refresh current item |
Ctrl+Shift+P |
Command palette |
This extension is licensed under the MIT License.
Made with ❤️ for the PostgreSQL Community
Also available on Open VSX







