Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Use this page when you know the task you want to complete, but you don't yet know which PostgreSQL extension article or surface to start with. If you want a feature-by-feature tour instead, start with the PostgreSQL extension for Visual Studio Code.
Choose the workflow that matches your task
| If you want to... | Start here | Then continue to... |
|---|---|---|
| Connect and run a first query | Quickstart: Connect and query PostgreSQL | Connections and identity, Query editor and IntelliSense |
| Explore an unfamiliar database | Object explorer | Schema visualizer, Copilot integration |
| Investigate a slow query | Query editor and IntelliSense | Query plan visualizer, Copilot integration, Server dashboard |
| Manage an Azure Database for PostgreSQL flexible server | Connections and identity | Server dashboard, Azure server management, Create a PostgreSQL server |
| Use Copilot or host-integrated AI workflows | Copilot integration | @pgsql chat participant, Agent mode, MCP server |
| Use terminal-based PostgreSQL workflows | Use psql in the terminal | Query editor and IntelliSense |
Connect and run your first query
Use this path when you're installing the extension for the first time or validating that a server is reachable.
- Start with Quickstart: Connect and query PostgreSQL for the shortest end-to-end setup.
- If you need saved profiles, Microsoft Entra ID authentication, AWS IAM authentication for Amazon RDS/Aurora PostgreSQL, or advanced SSL/TLS settings, continue to Connections and identity.
- After the connection works, move to Query editor and IntelliSense to open New Query, run statements, and inspect output in the PostgreSQL Query Results panel.
Explore an unfamiliar database
Use this path when you inherit an existing schema and need to understand the structure before you write SQL.
- Start with Object explorer to browse servers, databases, schemas, and objects in the Connections tree.
- If you need to find a specific object quickly, use Search Objects from Object explorer instead of expanding the tree manually.
- If you need a relationship map, continue to Schema visualizer.
- If you want schema-aware AI help identifying relevant objects or drafting the next query, continue to Copilot integration.
Investigate and optimize a slow query
Use this path when a query is slow, you need to understand why PostgreSQL chose a specific plan, or you want help narrowing down bottlenecks.
- Reproduce the statement in Query editor and IntelliSense.
- Open Query plan visualizer to inspect the execution plan in Tree View, Table View, Icicle View, or Source View.
- If you want AI assistance, use Copilot integration to choose between Analyze Query Performance, query-focused editor actions, or Agent mode analysis of the cached plan.
- For Azure-hosted servers, open the Server dashboard to correlate query findings with CPU percentage, IOPS, and connection metrics.
Manage an Azure Database for PostgreSQL flexible server
Use this path when you want to monitor or administer Azure Database for PostgreSQL flexible server without switching to the Azure portal for every step.
- Set up the connection and identity flow in Connections and identity.
- Select Dashboard on the server node to open the Server dashboard and review server details, metrics, and quick actions.
- Continue to Azure server management for firewall rules, parameters, backups, logs, and Azure-specific administration.
- When you need a new environment, use Create a PostgreSQL server to provision an Azure Database for PostgreSQL flexible server or create a local Docker-based instance.
Use Copilot or host-integrated AI workflows
Use this path when you want schema-aware chat, tool-driven automation, or host-level AI integration beyond a single editor command.
- Start with Copilot integration to choose the right entry point for the task in front of you.
- Continue to @pgsql chat participant when you want schema-aware chat in Copilot Ask mode.
- Continue to Agent mode when you want Copilot to connect, inspect schema, run queries, and work through multi-step database tasks.
- Continue to MCP server when your host supports automatic MCP registration and you want the extension's PostgreSQL tool surface available there.
Use native psql capabilities
Use this path when you need an interactive terminal session, \ meta-commands, COPY workflows, or script execution in a native psql environment.
- Start with Use psql in the terminal to open Connect with PSQL from a database node or to run Run file with PSQL for a saved
.sqlfile. - Return to Query editor and IntelliSense when you want IntelliSense, visual results, charts, query history, and export options in the editor.