Readit News logoReadit News
seveibar · 3 months ago
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 whether or not it's better to have your editor database-aware or to have your codebase have appropriate context committed. On one hand, less generated code/artifacts make for a cleaner codebase. On the other hand, not everyone uses VC Code or will know how to use this integration. Database browser GUIs have never really had a single winner. That said, VS Code does have enough dominance to potentially make themselves "the standard way to view a database in development"

[1] https://github.com/seveibar/pgstrap

semiquaver · 3 months ago
I’m confused. Isn’t including the canonical state of the database schema in version control along with all the migrations that brought it to that point a completely standard part of every web framework?
xyzzy123 · 3 months ago
It often is, but the schema might be written against a language-specific ORM.

That code might in turn have plugins or feature flags that mean you don't know the concrete sql schema until runtime.

Same for seed data and migrations.

So it depends on the use-case how useful this format is for tooling and discovery vs an actual connection to the database.

jen20 · 3 months ago
The _canonical_ state is what is in the production database(s). What's in version control is hopefully able to recreate it, with the obvious caveat of being highly unlikely to be able to repopulate the data.
cerved · 3 months ago
I'm more confused why the version control of the thing using the database is including the entire schema of the database in it's repository
wredcoll · 3 months ago
That "works" for about as long as you have <10 employees and <3 customers or so. After that the railsapp doesn't get to be the sole owner of the db.
netghost · 3 months ago
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.

seveibar · 3 months ago
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.
zX41ZdbW · 3 months ago
Wow, this is precisely how ClickHouse stores table metadata! A set of .sql files in the directories, corresponding to databases.
jsmith99 · 3 months ago
I just use a MCP server (with copilot or cline) that has a read only login to my database.
BoorishBears · 3 months ago
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.

Deleted Comment

layoric · 3 months ago
Out of interest.. does the resultant data get used by the LLM or just generating SQL, executing and returning separately?
pier25 · 3 months ago
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.

shawnz · 3 months ago
There is already a Microsoft SQL server extension for VS Code and this looks to effectively be a clone of it. After giving this a quick spin, it looks and feels the same as the SQL server extension, with the same menus, dialogs, etc. The SQL server extension I believe is what formed the basis of the now-deprecated Azure Data Studio (which was a VS code fork).

See here for the SQL server extension: https://marketplace.visualstudio.com/items?itemName=ms-mssql...

croblesm · 3 months ago
That’s correct—I’m the lead PM for the SQL extension in Visual Studio Code. We’ve been working closely with the PostgreSQL team; in fact, their extension is essentially a fork of ours, as you pointed out correctly.

Just to clarify on the Azure Data Studio (ADS) point: the MSSQL extension includes many of the core features from ADS, but our strategy is slightly different and focused on a modern, developer-first experience.

Here’s the link to our open roadmap—would love to hear your thoughts: https://aka.ms/vscode-mssql-roadmap

cerved · 3 months ago
Since most databases expose similar schema views it shouldn't be too complicated. Feels like JetBrains has been doing this for a long time
pamelafox · 3 months ago
I'm a developer advocate at Microsoft, and from my perspective, both teams have been putting in a bunch of effort improving their extensions. I participated in usability studies with both the teams behind the SQL Server extension and new PostgreSQL extension, and then once they were ready, I participated in bug bashes.

Both teams seem to very much want developers to enjoy their tools, so please do send them feedback on what you need out of the tools.

Follow Carlos Robles if you want SQL server extension news: https://www.linkedin.com/in/croblesm/

Follow Joshua Johnson for PostgreSQL server extension news: https://www.linkedin.com/in/johnsonjoshuae/

jiggawatts · 3 months ago
The problem customers have with these Shiny New Things that Microsoft keeps trying get us to switch to is that they drop features and entire product suites on the floor, even those that aren't officially deprecated and have no equivalent replacements. It's common to see SSRS, SSIS, SSAS in multidimensional mode, etc... simply forgotten about like they no longer exist.

Not to mention that SQL "SDK-style" projects only work properly in VS Code, so Visual Studio users are left out in the cold having to deal with an incomplete, half-baked solution.

croblesm · 3 months ago
Thank you so much, Pamela! You’ve been an amazing and key partner in our journey—your feedback and support have truly made a difference.
dzonga · 3 months ago
are we gonna get for sqlite ?
nevi-me · 3 months ago
I speculate that it's because the MSSQL tools have been maintained as part of Azure Data Studio, and were in better shape.

ADS is being sunset, and I was surprised when trying to install the Postgres extension on VS Code to find that it had its last meaningful contribution 6 years ago [0]. It couldn't work on newer VS Code versions.

I use ADS with both Postgres and MSSQL, prior to this announcement, I kept using ADS because there was nothing to migrate to.

[0] https://github.com/microsoft/vscode-postgresql/commits/maste...

croblesm · 3 months ago
You’re right—the old PostgreSQL extension was outdated. The team recently forked our modern MSSQL extension (I’m the Lead PM) to build a new one for PostgreSQL. It’s a fresh start, built on the same foundation we’re actively improving.

We’re still working on bringing over some Azure Data Studio features to the VS Code extension, especially around import/export (like flat file and DACPAC). I’d love to hear what else you think is missing.

If you’re interested, here’s our open roadmap: https://aka.ms/vscode-mssql-roadmap

hobs · 3 months ago
They built the postgres plugin in a way that nobody could usefully contribute to unless they worked at msft - like the rest of ADS the level of control they tried to maintain meant nobody wanted to work on it.
magicalhippo · 3 months ago
They already have the SQL Server Management Studio[1], which seems to cover similar ground?

I'm assuming they might want to move SSMS to VSCode in time, so trying it out by covering new ground, PostgreSQL, makes sense to me.

[1]: https://learn.microsoft.com/en-us/ssms/sql-server-management...

AdrianB1 · 3 months ago
No, it has a different purpose; VS Code extension and the former ADS are targeted for development, while SSMS is for server and database administration. I am a heavy user of SSMS and can do everything I ever need there, I don't use the VS Code extension for MS SQL even if I have it installed and I use VS Code quite a lot. This is because I am also acting as a backup and supervisor for our DBA team, so I am involved in DBA work.
pier25 · 3 months ago
But it's only for Windows

Dead Comment

wg0 · 3 months ago
I wish there was something similar for SQLite.
Sammi · 3 months ago
There are several sqlite vs code extensions and this one's my favorite: https://marketplace.visualstudio.com/items?itemName=yy0931.v...
osigurdson · 3 months ago
SQL server is in "cash cow mode" at this point. Investing more into tooling is unlikely to increase revenues at this stage.
pjmlp · 3 months ago
I can think of several improvements for Transact-SQL, starting with stored procedure packages.
Wojtkie · 3 months ago
The copilot integrations look sweet, as does the schema view. The MSSQL extension doesn't have those, but the rest of it looks similar to the Postgres one.
croblesm · 3 months ago
Lead PM for MSSQL extension in VS Code here. I’m glad to share that we have both features (Schema Designer, GitHub Copilot) into the MSSQL extension for VS Code. You can check out this end-to-end demo showcasing those capabilities: https://aka.ms/vscode-mssql-copilot-demo

As I’ve mentioned in a few other threads, the PostgreSQL team recently forked our MSSQL extension to kick off a fresh implementation for Postgres. It’s built on the same foundation we’re actively improving and evolving for both extensions.

90s_dev · 3 months ago
Microsoft seems to be going all in on open source over the past 10-15 years.

From a consumer perspective, we're almost all benefiting.

From a business perspective, they get unpaid help and community brownie points.

teruakohatu · 3 months ago
> going all in on open source over the past 10-15 years.

Given that there are many Microsoft closed source extensions for VS Code, that cannot legally be used with the open source Version of VS Code, I would say they are not going all in. Knee deep maybe.

90s_dev · 3 months ago
Also, given that they recently bought github, they have financial incentive to keep people there, who might upgrade to pro accounts or grow to need enterprise.
datavirtue · 3 months ago
And most of us are invested in MSFT, so we benefit that way as well. (I don't hold any positions)

Deleted Comment

globular-toast · 3 months ago
> Quite amazing they put the effort into this for Postgres instead of SQL Server.

Embrace, extend, extinguish.

coliveira · 3 months ago
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.
paulirwin · 3 months ago
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.

doubleorseven · 3 months ago
There is a parallel world, called enterprise. The enterprise people in this world, like enterprise software. They were born to be enterprise oriented. This is fine. Not everyone is like you and it's ok to use a robust product like MSSQL.
harrall · 3 months ago
SQL Server is technically very, very good.

But they charge you an arm and a leg for the pleasure, but it can be worthwhile for enterprise.

smt88 · 3 months ago
SQL Server, like Oracle, is technically fantastic. They were both ahead of Postgres for a long time and many people would argue they still are.

The reason people don't use them more often is that they're not free or even inexpensive.

paulryanrogers · 3 months ago
Legal, compliance, high performance, and familiarity are all valid reasons. (I'm actually not a fan, but less opposed now that it can run on Linux)
pjmlp · 3 months ago
SQL Server and Oracle are as actual as ever, regardless of the hate they get on FOSS circles.
MangoCoffee · 3 months ago
>MS SQL server is a legacy system

that's every SQL server out there included Postgres. Is NoSQL considered as none-legacy?

WuxiFingerHold · 3 months ago
>> all without ever leaving your favorite code editor

How do I install this on Neovim then? Is there a LSP? Or is this Microsoft proprietary? I wonder how much better without Copilot integration this is then the competition.

I'm using DBeaver CE currently. Does all I need (also for SQLite).

diggan · 3 months ago
When for-profit companies write "Democratizes X for all" it means "for people who can pay and aren't embargoed". When they write "Simplify" it means "Get locked in to our ecosystem". When they write "Your favorite X" it means "The product we're selling to you", and so on.

Once you start reading press releases with this business-dictionary, it gets a lot easier to just close the tab and move on.

asrael_io · 3 months ago
i feel like we need a first-era unsuck it search engine for this :D
fithisux · 3 months ago
Even for DuckDB, I use DBeaver CE the last 9 years professionally. Also when I do Python Dev I reach for JupySQL in Jupyter when I need something quick and it works in VSCode through Jupyter plugin..
qntmfred · 3 months ago
will definitely be taking a look at this. i started my career on mostly SQL Server and using SSMS fits my brain like a glove. i've been so dissatisfied with the typical options (pgadmin, dbeaver, datagrip, etc) for managing/querying postgres since i started using it probably like 10 years ago. postgres itself is great (don't get it twisted either, SQL Server is fantastic. just costs money) but i never understood why there wasn't more uproar in the community about its DBMS tooling ecosystem
FeloniousHam · 3 months ago
I've found Datagrip to be far and away the most impressive universal database tool. I feel like I've tried them all, and they all have a quality of having been developed by database people, rather than IDE designers. The depth of capability, extensibility, pace of improvement--I'm a very happy customer.

I don't want to poop on open source, but pgadmin and dbeaver and not even close to playing in the same league.

I work in Oracle and Datagrip saved my sanity.

Errsher · 3 months ago
Are there any features in datagrip in particular that you like that aren't in dbeaver?
polishdude20 · 3 months ago
I'd love to try datagrip, what are some advantages over pgadmin or others?

Deleted Comment

AdrianB1 · 3 months ago
In my experience most SQL developers don't care too much about tooling. In most cases someone designs the database and tables, developers don't care about databases and care mostly about tables and views, rarely about indexes. The ones that care, and need tooling, are usually called development DBAs and they are very rare. Rare enough I was never able to hire one and keep them (we don't pay enough for how rare they are).
sbuttgereit · 3 months ago
I've been in that camp for much of my career, and yes, tooling matters.

As you suggest however, tooling for that workload is pretty rare. I want something that focuses on enhancing the database development experience: that understands that there are development workflows for database code which are well controlled and rigorous. So many database tools are focused on being system administrative aids first, or giving you features for directly interacting and <ack> altering the running state of the database and its server from the tool.

The best tool I found for what I do was targeted at Oracle: Allround Automation's PL/SQL Developer (https://www.allroundautomations.com/products/pl-sql-develope...). It's a development oriented tool that, at least last I used it, was focused on serious development work rather than administrative work. Now, I haven't used it in almost 20 years when last I did Oracle development... but I haven't found anything for PostgreSQL that has that thoughtfully implemented database developer centric feature set.

Today I muddle through with DataGrip. DataGrip has just enough of what I need that it's marginally better to work with than just a simple text editor... and also narrowly avoids some misfeatures as not to negate it's utility.

specialist · 3 months ago
All true.

I loved workgroup style app development. R:Base, Access, dBase, FoxPro. Then I switched to UI work for a stretch.

Circling back to back-end work, naive me embraced Hibernate (2004?), assuming it'd be familiar and good.

I was wrong.

Now that I have a lot of free time, I'm finally recreating the workgroup style experience, for the general dev population. Sort of.

Using Hibernate, our workflow became: rough in some ORM hack, capture the generated SQL, use SQL Query Analyzer and Toad to make it work (and performant), coerce Hibernate to regenerate the SQL we want. Totally backwards, right?

Eventually we gave up and just used HQL.

At that point, why even bother with ORM?

So I created a "SQL first" workflow. Treat your SQL (DML) as source code, use those explicit queries to generate the prepared statements (and typesafe DAOs, DTOs, etc). In other words, auto-generate all the things you'd do yourself, if only you had more time.

I used my tool for years. Am currently making it usable for other devs. eg Spent last week making my grammar for MySQL "good enough" for initial release. Already have PostgreSQL and SQLite, plus my original turrible "poor mans SQL" grammar (comparable SQL-92). Which I'll cull once I have "good enough" T-SQL and PL/SQL grammars.

Any way. Thanks for reading.

I only meant to confirm your experience with development DBAs. The only such person I was able to retain was near retirement and was tired of the hustle.

WuxiFingerHold · 3 months ago
Hmmm, interesting. I used Datagrip for some years, now DBeaver (as I don't have a JB subscription anymore). Datagrip was and probably still is very powerful with top intellisense. Now I'm using DBeaver and it's very solid. Ok, I'm not spending my whole day in it, but when I need it, it does the job well.
impalallama · 3 months ago
Biggest thing that JetBrains has over VSCode for me was their very clean built in database tooling
bdcravens · 3 months ago
You can also run the database tool separate (DataGrip). That's what I do.
Version467 · 3 months ago
I didn't know about DataGrip. Looks cool.
mierz00 · 3 months ago
Every year or so I try to go back to VSCode but I can’t get past how good the git and database integrations are in JetBrains.
jeroenhd · 3 months ago
I think Code has fine git integration, but they way they implement it is just very Microsoft. The UI is very much like the one they use in their professional Visual Studio UI, and whether that's a good thing or not is definitely a very personal choice.

I much prefer JB's git integration, but I wouldn't discount it just because the UI is so completely different.

FajitaNachos · 3 months ago
Postico has always been my defacto way to interact with Postgres. Curious if there are any Postico users who have tried this yet.
deepsun · 3 months ago
Very Mac-oriented, and I think IntelliJ built-in DB editor has way more functions / features.
jasoncartwright · 3 months ago
The heavy Mac UX compliance is the reason why I enjoy using Postico for 99% of straightforward Postgres tasks
georgel · 3 months ago
10+ year user of Postico. I will give this a try. I hope Copilot can start recognizing the schema when I use node-pg.
pamelafox · 3 months ago
Congrats to the team on launching this! I was actually the first to demo it, as part of our sponsored session at Microsoft last week.

Here's the talk where I used it: https://www.youtube.com/watch?v=k6Vm2hakkV4

I also did a theater session at our MSFT booth, but the recording isn't up yet. You can follow the steps in this repo to check out all the features that I demo'd, however: https://github.com/Azure-Samples/postgresql-extension-playgr...

Let the team know about any issues here: https://github.com/microsoft/vscode-pgsql/issues

justusthane · 3 months ago
Hey, just a heads up that your website 404s if visted at "pamelafox.org", which is how it appears in your bio.
pamelafox · 3 months ago
Thanks, I need to move that website to GitHub Pages soon, the current host isn't handling the naked domain well. Changed to www.pamelafox.org for now.

Deleted Comment

Dead Comment

Deleted Comment

Toritori12 · 3 months ago
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...).
J_McQuade · 3 months ago
Easily VSCode, if we're talking about developer reach. I'm not big into Microsoft stuff, but almost every 'serious' .Net developer I personally know is using Rider, so I can only assume that Visual Studio is retreating to the same space occupied by Eclipse and Netbeans, i.e. still used, but mostly only in places where change is hard.

I'm an emacs user and even I keep a copy of VSCode installed just because I occasionally have to interact with SQL Server and it's really the best way to do that on non-windows systems now that they're winding down ADS.

dmurray · 3 months ago
I work at a mostly .NET firm and almost all the developers on that side of things are on Visual Studio. Rider has less penetration than PyCharm has among the Python devs.
gregd · 3 months ago
I only use Rider because it's cross-platform. It's not inherently better (or worse) than Visual Studio with Resharper installed.
solarkraft · 3 months ago
Most .Net devs I know use VS, I used Rider because it’s so much less awful.
pjmlp · 3 months ago
Monetarily, Visual Studio.

There are tons of enterprise development workflows, and plugins, that probably will never be ported into VSCode, from their .NET and COM implementations.

Now in terms of mindshare, and gateway drug into Microsoft ecosystem, definitely VSCode.

It is also the best Web IDE, for the return of timesharing development, sorry cloud.

That alone means everyone that is on Github and Azure, gets to use it as the modern version from X Windows and RDP/Citrix sessions.

Not bad, for Eclipse v2 (Enrich Gamma is one of the main architects), pity the whole Electron shell though.

pphysch · 3 months ago
How is VSCode a "gateway drug" into the MS ecosystem? It's good PR, for sure, but it has little to no conceptual/GUI overlap with, say, Windows.

FWIW I use it via Linux .deb and integrate with a private GitLab.

edg5000 · 3 months ago
VS Code is a downgrade from open source to freeware. At least the C++ plugin is freeware. And they block access to the extension store from any fork (self-compiling VS code is also considered a fork). So if you are an OSS purist, VS is bad. Other than that it's effing great.
newlisp · 3 months ago
It is also the best Web IDE, for the return of timesharing development, sorry cloud.

Also the best webdev IDE.

tempodox · 3 months ago
Erich Gamma
dist-epoch · 3 months ago
> where you were supposed to move to Visual Studio after you became a real dev

It was never marketed like that, for the simple reason that popular VSCode languages like Python/HTML/Javascript were never well supported by regular Visual Studio, so there is no way to move to "proper" Visual Studio if you do Python/web development.

epolanski · 3 months ago
VS could do web okay 5 years ago, haven't run it since.
dontlaugh · 3 months ago
Visual Studio is still widely used in the games industry, being pretty much a requirement for targeting some platforms.

It is becoming common for some to use Rider primarily, but VS is still used as part of the build system.

jjeaff · 3 months ago
it has to be VS Code by a long shot. They don't charge for it, but it serves as an enormous draw to keep people in the MS ecosphere and keeps MS in the developer game.
rafaelmn · 3 months ago
That's ironic since I develop most of my Microsoft related tech with JetBrains products and only use vs code for frontend/node - non Microsoft stuff.
TiredOfLife · 3 months ago
> 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?

Toritori12 · 3 months ago
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.
bargainbin · 3 months ago
Yeah I’ve been using it since it was released and can’t ever remember it being marketed as such.