Live data from Hacker News

Postgres IDE in VS Code

techcommunity.microsoft.com

161–170 of 433 posts

Re: Postgres IDE in VS Code

#161
post #8

Oh woah this looks great. Quite amazing they put the effort into this for Postgres instead of SQL Server. The demand must be a lot higher.

MS SQL server is a legacy system. I don't think any business would create a new database using SQL server unless, for some technical reason, they don't have any other option.

Azure SQL Database for a long while has been the most cost-effective way of running SQL Server as a PaaS database, and still is if you choose the DTU-based modes, making it a very attractive option. Combined with the rich feature set and maturity and reliability of SQL Server, it is hardly legacy; in fact it's very capable and continues to get new updates like vector operations.

I've helped create apps that support millions to hundreds of millions of revenue on Azure SQL Databases that cost at most a few hundred dollars per month. And you can get started with a S0 database for $15/mo which is absolutely suitable for production use for simple apps.

Unfortunately, I think Microsoft realized how good of a value the DTU-based model was, and has started pushing everyone to the vCore model, which dramatically increases the barrier to entry for Azure SQL Database, making PostgreSQL a much more attractive option. If Microsoft ever kills off the DTU purchasing model of Azure SQL Database, I likely won't be recommending or choosing Azure SQL Database at all going forward. It'll 100% be PostgreSQL.

Re: Postgres IDE in VS Code

#162

This solves a major problem that I built an npm package called "pgstrap"[1] for. It generates a "database structure" directory so that my database schema is available to LLMs (it also makes code review easier because you can see the changes to various tables). So I have a SQL file for each table in my database, neatly organized into directories for each schema. Rails has a similar idea with schema.rb I'm not sure whe…

I just use a MCP server (with copilot or cline) that has a read only login to my database.

Which is strictly worse than just giving the LLM access to the source of truth for the database.

You're adding a round trip to the database and the LLM and inserting a tool call in the conversation before it even starts generating any code.

And the reference Postgres MCP implementation doesn't include Postgres types or materialized views, and is one of the most widely used packages: Zed.dev's MCP server for example, is seemingly just a port of it and has the same problem.

Re: Postgres IDE in VS Code

#163

This solves a major problem that I built an npm package called "pgstrap"[1] for. It generates a "database structure" directory so that my database schema is available to LLMs (it also makes code review easier because you can see the changes to various tables). So I have a SQL file for each table in my database, neatly organized into directories for each schema. Rails has a similar idea with schema.rb I'm not sure whe…

That seems like a really pragmatic tool, thanks for sharing it! I'm curious, do you output triggers, store procedures, and such? Many tools seem to stop after you've defined tables, columns, and indices, but I'd love some better tooling to make use of the rest of the DB's features.

Yep! It basically runs pg_dump and categorizes all of the output into different files so it should be comprehensive. I think there's `functions/function_name.sql`, `misc.sql`, `triggers.sql` etc.

Re: Postgres IDE in VS Code

#165
There seems to be a bug — I can't re-run the query from the query history panel; it returns no results.

New query could still get results.

Overall, it should have been a separate app because you can't really see all the results in a small panel.

Re: Postgres IDE in VS Code

#166

Isn't PGAdmin good enough? Not hating, but I'm not a database guy either so just curious why create a VSCode extension for GUI stuff.

it's nice to have copilot in the db admin tool. I use pgadmin every day, and it's great, but lately i have found myself wishing to have AI support in writing certain queries.

Re: Postgres IDE in VS Code

#167

I wonder what is the most "valuable" IDE right now for MS. A few years ago VsCode was marketed essentially as "Visual studio for beginners", where you were supposed to move to Visual Studio after you became a real dev, but since then VSCode has been growing and growing and stands now as the most used "IDE", where Visual Studio is mostly seen as "legacy" (oversimplification, great IDE for CPP and .NET but still...).

> A few years ago VsCode was marketed essentially as "Visual studio for beginners", where you were supposed to move to Visual Studio after you became a real dev, When was that?

I wont likely find the video but I remember watching the PM for both VSCode and VS (at the time was the same one, not sure now) recommending people to move to Visual Studio "eventually". I clearly remember it because it didn't make any sense, even if the names were similar there were/are nothing alike UI-wise and supported-language-wise. I said few years ago but it was prob around 8 years ago, vsc was still pretty young.

Re: Postgres IDE in VS Code

#168

Isn't PGAdmin good enough? Not hating, but I'm not a database guy either so just curious why create a VSCode extension for GUI stuff.

The longer I work in engineering the fewer windows I want open on my screen

If this is “PGAdmin, but 50% worse, but it just lives as another tab in your editor instead of another application” that is genuinely a huge win for me

Probably that’s because my day-to-day isn’t actually database administration, it’s application development where I need to be able to work with a database from time to time — so the preservation of context, however marginal, is really nice.

Re: Postgres IDE in VS Code

#169
post #140

Earlier quoted context omitted.

Huh, I'm not sure I said anything like the above.

It's in the same general space, no? If it helps at all, there's also this: " Assume good faith " - https://news.ycombinator.com/newsguidelines.html

Not to belabor the point too much, but assuming good faith is different from trusting anonymous advice from people claiming to be official advocates that could do real damage to your company if legal wanted to bone you.

Yes they are a new user, but they appear to have made the account just to make that comment.

Re: Postgres IDE in VS Code

#170

Isn't PGAdmin good enough? Not hating, but I'm not a database guy either so just curious why create a VSCode extension for GUI stuff.

Can you setup entra authentication with PgAdmin? I'm more of a MS Sql person so I don't know, but if not the security improvement from this would be a huge improvement
Post reply on HN