2026-11-26 15:51 UTC

Microsoft brings PostgreSQL workflows and Copilot into VS Code

state: expiredheat: lowuncertainty: mediumrelevance: mediumvscode-postgresql database-tools coding-agentsMicrosoftCynthia Zanoni

What is this?

Microsoft’s PostgreSQL extension for VS Code brings database connections, object and schema browsing, SQL editing and execution, and query assistance into the editor. Microsoft’s post describes using connected database context with Copilot; supplied search results also document a PostgreSQL Copilot agent and Agent mode, which can take actions such as inspecting schemas and running queries. These are distinct from the Azure PostgreSQL Database Agent experience in the post, which is described as upcoming, with actions applied manually and automated remediation only a future capability. The extension’s public preview was announced in 2025; the supplied October 2026 post is workflow guidance, not evidence that Database Agent is generally available.

Why it matters

Microsoft is bringing PostgreSQL exploration, SQL editing, and Copilot assistance into VS Code, reducing the need to switch between an editor and separate database tools. The broader possibility is an AI assistant that can move from explaining a database to taking structured actions—such as inspecting schemas or running queries—but those actions need review, especially against production data. The post’s Azure Database Agent is described as upcoming, not generally available.

Current assessment

Microsoft’s October 26, 2026 developer post describes connecting to local, on-premises, or cloud PostgreSQL databases; browsing database objects and schemas; writing and running SQL; and using database context with Copilot. Web results add useful current context: Microsoft Learn describes @pgsql Copilot integration and Agent mode, where an assistant can inspect schemas and run queries; the project repository snippet describes additional actions, including creating tables and importing CSVs. These capabilities are distinct from the Azure PostgreSQL Database Agent in the post, which is presented as upcoming, with actions applied manually and automated remediation only discussed as a future capability. The extension itself was announced in public preview in 2025, so the October post is workflow guidance rather than evidence of a new launch. AI-assisted database work could make schema discovery and query iteration more accessible inside familiar coding tools, while agent actions raise the importance of permissions, result validation, and human review. The supplied evidence does not establish adoption, independent performance, or general availability of Database Agent.

Measured heat

no measured readings yet — the hourly heat pass fills this in

How the heat travelled

10-25 13:00⭐ origin echo-reconstructedThe original Microsoft post says the PostgreSQL extension for VS Code lets developers explore database objects, write and run SQL, and use d
Microsoft (Cynthia Zanoni and Pooja Yarabothu) on blog (echo) · attributed from hn.story.50256439
—
10-27 09:18first on hacker news · published · +44.3hPostgreSQL Like A Pro: Build, query, and troubleshoot without leaving VS Code
mariuz
—
10-27 09:18amplified on hacker news 👑hn.story.50256439
mariuz
peak 1 · 0 comments · 105% of case engagement
10-27 09:26our radar first saw it · +44.4hdiscovery anchor: hn.story.50256439—

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnPostgreSQL Like A Pro: Build, query, and troubleshoot without leaving VS Code
Retrieved article excerpt

Open article · Retrieved 2026-10-27T09:27:19.067708+00:00

You’re building an app in VS Code. Then you need to check a table, understand how two tables connect, or figure out why a query is slow.

That often means opening another tool and finding your way back to the code.

The **PostgreSQL extension for VS Code** brings common database tasks into your editor. You can explore database objects, write and run SQL, and use database context with GitHub Copilot as you work.

Here are four ways to make that part of your development workflow, from finding your first table to reviewing a performance recommendation. Each section includes a video from [**PostgreSQL Like a Pro: VS Code Edition**](https://aka.ms/postgresql-like-a-pro-vscode) if you’d like to follow along.

## 1. Get connected and find your way around 🔌

Before writing a query, you need to know what’s in the database.

Install Microsoft’s PostgreSQL extension, then select the PostgreSQL icon in the Activity Bar to add a connection.

You can connect to on-premises or cloud databases and save connection profiles to reuse later. For a database on Azure, the Azure connection path lets you sign in with Microsoft Entra ID and select your subscription, server, and database.

Once connected, expand the server, database, and schemas to browse tables, views, functions, sequences, and extensions. Start with one table your application uses. You don’t need to understand the entire database to take the next step.

> 💡 **Try this:** Save a connection profile, then find one table your application uses and explore its structure.

PostgreSQL Like A Pro: Build, query, and troubleshoot without leaving VS Code

## 2. Write SQL you can explain ✍️

You know what the application needs. Now you need a query that returns the right data.

Suppose you need to find **which customers generated the most revenue in a quarter**. That means joining customer and payment data, adding a date filter, and grouping and sorting the results.

The query editor’s IntelliSense helps with SQL syntax, table and column names, and join expressions. Once you have a starting query, you can ask Copilot to help refine a filter or analyze its performance using query plans and execution metrics.

For a query like this, aggregating payments before joining is one possible rewrite to investigate, not a rule to apply everywhere.

**Check the results as well as the execution plan.** A faster query still needs to answer the right question. Review generated SQL before running it, and compare the original and revised results.

> 💡 **Try asking:** “Analyze this query’s performance. What does the execution plan tell us, and what should I check before changing it?”

PostgreSQL Like A Pro: Build, query, and troubleshoot without leaving VS Code

## 3. Understand a database you didn’t build 🔎

Which table contains the data you need? How does it connect to the rest of the application?

Those are often the first questions when you inherit a project.

Start broad in **Object Explorer**. Look for schema names, naming patterns, and tables or views that match the feature you’re working on. Then use schema visualization to trace how the relevant objects connect.

With the connected database context available in Copilot Chat, ask a focused question. For a film rental application, that might be:

- Which tables contain actor and film data?
- How are they connected?
- Where is rental status stored?

Treat the answer as a starting point, not a verified map. Check the objects in the tree, review the relationships in the visualizer, and run a small read-only query to confirm that you’re following the right data path.

> 💡 **Try this:** Ask one discovery question, then verify the answer against the database before asking the next.

PostgreSQL Like A Pro: Build, query, and troubleshoot without leaving VS Code

## 4. Turn a performance issue into a decision you can review 📊

Connection drops and rising latency tell you something is wrong. Figuring out why usually means gathering logs, comparing metrics, and building a timeline.

Before changing anything, look for a useful chain of evidence: **what changed, when it changed, which workload is involved, and why a particular action might help.**

For example, repeated customer-history lookups on a large transactions table might lead to a composite-index recommendation. The next step isn’t simply to create the index. Review the supporting metrics, expected outcome, and rollback guidance first.

**Database Agent** brings these pieces together in the Azure PostgreSQL experience shown in VS Code. You can also ask Copilot for help understanding a recommendation before deciding what to do.

> 📝 **Availability note:** The accompanying video introduces Database Agent as an upcoming experience, with actions applied manually. Check current availability and Azure requirements; automated remediation is discussed as a future capability.
>
> 💡 **Before acting:** Can you explain why the change should help, how you’ll check the result, and what you’ll do if it doesn’t?

Troubleshoot and Optimize PostgreSQL Performance in VS Code

## Try it ✅

1. **Build with the PostgreSQL extension for VS Code:** <https://aka.ms/pg-pro-vs-code-repo>
2. **Explore one table your application uses.** Inspect its structure and relationships before writing a query.
3. **Write and review a read-only query.** Check the tables, joins, and filters, then run it and confirm the results match your requirement.

> **💬 Which database task takes the most detective work for you: understanding the schema, writing queries, or investigating performance? Let us know in the comments.**

Happy coding! 💙
mariuz10
🟧 echo.blog ⭐The original Microsoft post says the PostgreSQL extension for VS Code lets developers explore database objects, write and run SQL, and use dMicrosoft (Cynthia Zanoni and Pooja Yarabothu)——

Interpretation history

Decision trace