seveibar 2 hours 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

  • netghost 2 hours 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 10 minutes 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.

  • jsmith99 2 hours ago

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

    • BoorishBears 11 minutes 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.

todotask2 6 minutes ago

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.

qwertywert_ 9 minutes ago

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.

  • lukebuehler 6 minutes ago

    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.

pier25 3 hours 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 2 hours 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...

  • nevi-me 3 hours 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...

    • hobs 3 hours 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.

      • 0cf8612b2e1e 3 hours ago

        That is seemingly true of a bunch of tools. I am using an official Microsoft Python library - the repo is public on GitHub, but all of the CI or other backend integration is behind the Microsoft curtain, so it is impossible for the public to actually participate. The cherry on top is that the team that used to support the tool was impacted, so now nobody can maintain the thing.

  • osigurdson 2 hours ago

    SQL server is in "cash cow mode" at this point. Investing more into tooling is unlikely to increase revenues at this stage.

  • 90s_dev an hour 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 an hour 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.

      • ahartmetz 39 minutes ago

        Because of the closed extensions situation, the open source part feels insincere. Sort of like a free plan up to 10 users and then pretty expensive situation. The purpose isn't the free plan, it's just an advertising measure to get people to where you really benefit eventually.

    • 90s_dev an hour 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.

  • wg0 an hour ago

    I wish there was something similar for SQLite.

  • Wojtkie 3 hours 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.

  • coliveira an hour 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 11 minutes 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 an hour 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 an hour 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.

      • CharlieDigital an hour ago

        I spent the early part of my career in MSSQL and the current part in Pg.

        MSSQL is extremely, extremely capable as a database engine.

        But it also costs an arm and a leg. People who haven't used it don't know just how capable it is.

    • MangoCoffee 25 minutes ago

      >MS SQL server is a legacy system

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

    • paulryanrogers an hour 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)

    • smt88 an hour ago

      SQL Server, like Oracle, is technically fantastic. They were both ahead of Postgres for a long time and many people would argue SQL Server still is.

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

qntmfred 3 hours 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 41 minutes 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 24 minutes ago

      Are there any features in datagrip in particular that you like that aren't in dbeaver?

FajitaNachos 2 hours ago

Postico has always been my defacto way to interact with Postgres. Curious if there are any Postico users who have tried this yet.

zamacho an hour ago

Is there a similar extension for MySQL in VS Code?

  • jamesgeck0 15 minutes ago

    Database Client is fairly similar. I don't think it does the schema diagrams or AI stuff, but it can do notebooks. Has a shareware pricing model, free for up to three active connections. https://database-client.com/

bdcravens 2 hours ago

Looks nice enough. I only wish there was an easy way to spread VS Code across multiple monitors. I commonly will work in code on one monitor, and the database tool (DataGrip currently) on another.

impalallama 3 hours ago

Biggest thing that JetBrains has over VSCode for me was their very clean built in database tooling

  • bdcravens 2 hours ago

    You can also run the database tool separate (DataGrip). That's what I do.

Toritori12 2 hours 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 2 hours 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.

    • solarkraft 43 minutes ago

      Most .Net devs I know use VS, I used Rider because it’s so much less awful.

    • gregd 2 hours ago

      I only use Rider because it's cross-platform. It's not inherently better (or worse) than Visual Studio with Resharper installed.

  • pjmlp 2 hours 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.

    • newlisp 2 hours ago

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

      Also the best webdev IDE.

    • pphysch 2 hours 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.

      • pjmlp an hour ago

        Worrying about Windows is fighting the last war.

        Azure, Github, CoPilot, .NET (why do you think it is cross-platform), Java (yes, MS is back in Java land, they were the ones with initial ARM support), Go (they have their own FIPS compliant distro), Python (although with layoffs maybe not anymore), Rust, npm, Powershell, Powerapps, 365 AddIns, Teams plugins, clang/cmake (part of Visual Studio installer), Azure Linux, Sphere OS,....

      • acdha 2 hours ago

        Azure and GitHub are large Microsoft revenue sources. Both have first-class VSC integration.

    • tempodox 2 hours ago

      Erich Gamma

      • pjmlp an hour ago

        Thanks for the correction.

  • jjeaff 2 hours 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.

  • dontlaugh an hour 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.

  • TiredOfLife 2 hours 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 4 minutes 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 an hour ago

      Yeah I’ve been using it since it was released and can’t ever remember it being marketed as such.

weitendorf 2 hours ago

The AI integration is interesting to me. I have been trying to get Claude to help me with postgres from within my product and have found its ability and understanding of postgres/sql to be significantly worse than with common programming languages.

Maybe it's because my tolerance for imperfection is much lower for databases than web apps, but it is so bad that I can't trust it for anything database-related beyond text transformations and generating boilerplate queries. It will incorrectly tell me things like postgres doesn't support TABLE OF <TYPE>, or make syntax errors for ON CONFLICT, and immediately agree with any "what about" or "are you sure" I throw at it.

Curious if anybody else has run into this. Obviously LLMs are not always great in specialized domains like this but the poor performance with something as popular as postgres is pretty uncharacteristic IMMO.

  • dwedge 2 hours ago

    I think it's more that LLMs are a given percentage (let's say 30%) inaccurate in general, and the results of this inaccuracy are just more immediately obvious with SQL

wolframhempel 3 hours ago

Looks amazing- and the point they're making in the article is correct. Switching back and forth from VS to PG Admin creates friction that this seems to solve in a much nicer way

pgwhalen 3 hours ago

Doesn't look like there's much beyond what's currently possible in DataGrip yet (which is far beyond any other SQL client I've used), but nice to see a competitor in the space - especially one that will push JetBrains on the AI assistance side of things.

jenny91 27 minutes ago

Glad to see them releasing it under an MIT license.

nico 3 hours ago

Nice. The few db managers I’ve tried in VS Code are so awkward, creating files for queries and opening multiple panes that barely fit in the crowded IDE space

It makes me wish for something like phpmyadmin or adminer

jasonthorsness 3 hours ago

I use DataGrip, but only for very simple tasks and only against PG and occasionally SQLite and it has always felt like way overkill for me (and it's a heavy app). This will be a more convenient option!

  • codingjerk 2 hours ago

    DataGrip would be perfect if it had a community edition. As someone who connects to a database only two or three times a week, I’m not willing to pay for it.

    • jasonthorsness 2 hours ago

      Yeah I already have the all-products pack for Goland, Clion, and Resharper, I wouldn't have purchased DataGrip separately

    • getgalaxy 2 hours ago

      try galaxy instead ;) getgalaxy.io

saqadri 2 hours ago

This is so cool. A big reason I used prisma was for prisma studio. Having this kind of support in vscode is nice to see

  • gniting 2 hours ago

    (prisma team member)

    We're going to be rolling out Prisma Studio as a VS Code extension soon!

    • ketzo 2 hours ago

      Ooooh can’t wait for that, and for further investment in Prisma Studio generally — already a really nice tool, I just want some slightly more power-user-y stuff!

cebert 2 hours ago

I wonder how well this IDE works if you use AWS or GCP instead of Azure.

  • deepsun 2 hours ago

    I assume you run cloud-sql-proxy as usual (for proper TLS and passwordless IAM authentication), and then it's just another postgresql port for you. Any tool like psql can connect to it.

  • tsumnia 2 hours ago

    I run a personal Postgres server so I'm wondering how well it does there

huqedato 3 hours ago

Very nice and long awaited. Thanks Ms. There are basic features available now (visualisations and query). Looking ahead for more, such table/data editing etc.

  • briffle an hour ago

    I like that I can run this remotely with the vscode ssh extension to my remote systems. But compared to dbeaver, I miss some of the features of dbeaver. Like showing an estimate of large each table is, and seeing how many rows in the 'properties tab'. And being able to see the ERD graphics for individual tables (to show foreign keys, etc).

    Also like with dbeaver that you can take the results and export them in many different formats. like directly to excel for some of my co-workers who live and die in excel.

abetaha 2 hours ago

This looks great. Would all the functionality work if the databases are hosted on other cloud providers?

  • maxluk an hour ago

    I am PM from the project - short answer is yes - you can connect to any Postgres endpoint. There are some Azure specific features, like EntraID supported by the extension that don't exist in other cloud providers.

getgalaxy 2 hours ago

Super cool for them to finally add in VSCode. My team is trying to build even more here by building a dedicated SQL editor with a context aware AI copilot, and with sharing and collaboration so we don’t need to send queries in slack anymore :)

Check it out and get on the waitlist getgalaxy.io/explore/product-tour

happy to chat live with anyone if interested, support@getgalaxy.io

deelowe an hour ago

Does something like this exist for mysql?

nodesocket 37 minutes ago

This might already exist, but seems like AI would be a natural fit and efficient at recommending indexes based off queries. I’ve been building a Python SQLite3 app and I gave ChatGPT the entire schema along with all queries and it did a fantastic job at recommending queries and explaining them. Compound indexes, unique indexes, compound primary keys. Taken a step further, if a process ran live inspecting queries in real time and then sent notifications of missing indexes would be super useful.

  • tudorg 19 minutes ago

    I think you are describing Xata Agent :) https://github.com/xataio/agent It watches metrics/logs, queries pg_stat_stetements for slow queries, the sends slack notification with suggestions, including indexes, but can be more varied than that.

highwaylights 3 hours ago

Nice that they’ve got it working so well with copilot, the only thing keeping me from buying a premium sub is that they don’t bundle GitHub copilot with office copilot.

It seems like all their copilots are seperate subs, which seems like a missed opportunity honestly.

barfolomew 2 hours ago

I will be using this. 100%. very handy

rubabu an hour ago

does this work for non-Azure?

  • maxluk 20 minutes ago

    PM on the project here - Yes! It works on any Postgres, on-prem or cloud

mrits 3 hours ago

I'm sure nobody cares, but I just independently stumbled upon this an hour ago and wondered why more people haven't used it.

kstrauser 3 hours ago

It has a proprietary license[0]. That makes it a non-starter. Too bad: it looks nifty!

> The software is licensed, not sold. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you will not (and have no right to):[…] d) use the software for commercial, non-profit, or revenue-generating activities

Oops. Better not install this on your work laptop!

[0] https://marketplace.visualstudio.com/items/ms-ossdata.vscode...

  • lossyrob 2 hours ago

    Dev on the project here - I'll mention that this language is due to corporate boilerplate public preview licensing. It is absolutely available and encouraged for use in commercial etc. activities. The licensing language needs to be fixed.

    • kstrauser 2 hours ago

      That's good to know! Right now it's pretty much illegal for anyone to use it in the situations most people would want to use it for. Any idea what the eventual license will be?

    • lolinder 2 hours ago

      [flagged]

      • dang 2 hours ago

        Please don't harangue new users as soon as they show up to HN. Whatever legitimate point you have is drowned out by the atmosphere of hostility you create.

        Not only that but it damages the reputation of this community.

        You (<-- I don't mean you personally, but all of us) should be welcoming to new users and assume good faith, as the site guidelines ask (https://news.ycombinator.com/newsguidelines.html). There's no reason why you can't make your substantive points while doing so. (Edit: you needn't look far for a good example: https://news.ycombinator.com/item?id=44074135.)

        It might also be good to remember that everyone makes mistakes, that project launches don't always go perfectly, and that HN is for discussing the interesting aspects of a submission.

        • lolinder 2 hours ago

          I didn't mean it to be haranguing, but OP was giving what amounted to legal advice that was actually wrong and dangerous. I do think that needs to be called out and clarified—not as a personal attack on OP but just as a matter of safety for readers.

          I'll acknowledge that kstrauser may have done a better job of sounding friendly about it, but I don't think my question was out of line nor even particularly aggressive given the circumstances.

          • dang an hour ago

            I'm sorry to press the point, but I don't think you're correctly assessing the impact of comments like your GP post, especially on a legit new user like lossyrob.

            You may not have meant to be haranguing, but intent doesn't communicate itself—at least not in the tiny textblobs which are all we have here. It has to be encoded in the actual message.

            When I look at your comment from that point of view, I notice that it leads with a hostile personal trope ("You do recognize...?"), followed by a putdown of everything this team is probably hoping for ("no one should use this"), followed by a personal attack ("you shouldn't be encouraging people to do so"), followed by a pedantic hammer-blow ("legally the license is the license") that takes the spotlight away from anything new or exciting about their work. That is followed by a sentence that basically shames them for what was obviously just an oversight. How is a newcomer (or anyone, for that matter) supposed to feel when they encounter that?

            You're a good HN member and I'm sure you didn't intend to condemn or humiliate anyone. The problem is that people routinely underestimate the provocation in their own comments and overestimate the provocation in others'. If the error is 10x in each direction, that's a huge skew [1]. That's why it's hard to track the impact that one's posts have—especially the righteously indignant sort of post [2].

            I suppose one of the moderators' jobs is to step in and try to articulate that explicitly, in the hope of persuading enough users to generate a bit of a system correction.

            [1] https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...

            [2] which, by the way, I can feel a bit of in my own comment just now, and I'm probably underestimating it too.

          • pvg 2 hours ago

            OP was giving what amounted to legal advice

            That is a huge overstatement that you can't really use to justify the haranguing. They just popped in to address the potential issue and let people know they're trying to sort it out. Nobody is giving legal advice and nobody is going to end up in legal trouble because Microsoft messed up their license boilerplate for a bit.

      • franktankbank 2 hours ago

        [flagged]

  • krferriter 3 hours ago

    Can't use it for commercial, non-profit, or revenue-generating activities? Uh, this actually seems insane to me? What is it for then?

    • dragonwriter 2 hours ago

      > Can't use it for commercial, non-profit, or revenue-generating activities? Uh, this actually seems insane to me? What is it for then?

      Its a public preview, for which Microsoft probably does not wish to accept non-disclaimable liabilities for defects when used in those circumstances.

      It is for previewing. By people who are interested in what is in the pipeline for a more general release.

    • kstrauser 3 hours ago

      My initial reaction is "entrapment".

      Edit: That's uncharitable of me. I strongly doubt that's the plan. But it genuinely was the first thing that came to mind.

    • jasonthorsness 2 hours ago

      I'm sure these restrictions will lift once it's out of preview. They have a huge Postgres hosting business in Azure that couldn't benefit from this if it's restricted to non-commercial.

    • jkaplowitz 2 hours ago

      I assume that restriction is due to the public preview status. But yeah MS really ought to at least allow businesses to evaluate it for potential subsequent use after preview.

    • 85392_school 2 hours ago

      > PRE-RELEASE SOFTWARE. The software is a pre-release version. It may not operate correctly. It may be different from the commercially released version.

  • pier25 2 hours ago

    Probably a copypasta mistake?

    Why would they spend money into this extension if 99% of developers can't use it?

    • atmosx 2 hours ago

      Because most people will use it without reading the license, giving them the upper hand when they might needed it? Might sound a but harsh, but we're talking about Microsoft.

      • johnfn 2 hours ago

        Is there a single example of MS doing something like this in the last 10 years?

        • adhamsalama 2 hours ago

          VS Code forks like Cursor that use their extensions?

          • pier25 2 hours ago

            That's not precisely a developer using the extension...

    • kstrauser 2 hours ago

      Maybe, but darned if I'm going to be the one to take the legal risk of installing it.

      • Rastonbury 2 hours ago

        I'm willing to put good money that MS is not going to sue anyone for using this

        • kstrauser 2 hours ago

          I am extremely doubtful that they would. And yet, using it under that license is taking the legal risk that they'll act kindly even though they have the right, under the license, to be jerks about it.

          Is MS going to be a jerk about it? Almost certainly not. Could they if they wanted to? Sure seems like it.

  • jasonthorsness 3 hours ago

    I worry that with the threat of Cursor this will be more common now. Microsoft's business interest will prevent them from funding development work that directly benefit the popular forks (for years they probably assumed no fork could ever gain traction...).

    • kstrauser 3 hours ago

      I suspect you're right. And thus came the end of the era of free VSCode.

    • Onavo 3 hours ago

      Microsoft owns shares of Cursor through OpenAI

  • ldjkfkdsjnv 2 hours ago

    does anyone actually think like this?

    • kstrauser 2 hours ago

      Anyone who works in risk management and/or threat modeling for a living does.

      • ldjkfkdsjnv 2 hours ago

        thats such a small percentage of people

    • ahartmetz 2 hours ago

      I go further than that and say screw Microsoft's partially open source stuff. Because VS Code isn't fully FOSS, which is a bit weird, isn't it.

_ink_ 3 hours ago

> [...] all without ever leaving your favorite code editor.

That's cool. How do I get this into JetBrains IDEs?

  • jrockway 3 hours ago

    I feel like JetBrains' competing product is DataGrip, which even though I'm an Emacs user, I've happily paid for forever. I believe that if you just use the combined suite (IntelliJ?) then you get SQL completion based on your loaded database everywhere in the IDE. Something fun I accidentally learned this way is that the completion is so accurate I didn't even notice that I made a mistake in a database table I recently added. I used camelCase column names, which Postgres doesn't accept without quotes. Datagrip always added the quotes where I needed them, so I didn't notice, but it annoyed people on my team that used different database tools and they renamed them ;)

    JetBrains has always done their completion / language integration differently than VSCode + LSP, but it seems to work well. My only complaint is that GoLand organizes imports differently than gopls / goimports, but my knowledge there is a few years out of date. I've worked on teams with a lot of GoLand users and nothing has really bothered me on this front recently, so they probably fixed it years ago.

    • throwaeay 2 hours ago

      > I believe that if you just use the combined suite (IntelliJ?) then you get SQL completion based on your loaded database everywhere in the IDE.

      Yes, Intellj will recognize that the string in my code is an SQL statement and use auto complete and validation when it is connected to a database.

      I've looked at the announcement and it seems that the functionality of Jetbrains is similar.

    • pzmarzly 2 hours ago

      Out of curiosity: how do you set up your CI checks (linter, formatting) if the opensource tools behave differently from JetBrains'? Do you use Qodana[0]?

      One benefit of using VSCode/Sublime Text/vim/emacs language integrations is that I roughly know what command to run to get the same results in the terminal as I get in the editor. With JetBrains does-it--all IDEs, I have no clue.

      [0] https://www.jetbrains.com/help/qodana/getting-started.html

      • jrockway 2 hours ago

        As far as I went with linting this sort of thing was to check that "gofmt -s" yields the code that's checked in. https://github.com/pachyderm/pachyderm/blob/master/src/inter...

        It does not care if the imports are organized differently. I like to do:

           import (
              # standard libraries
              "fmt" 
              "io"
        
              # our stuff
              "github.com/pachyderm/pachyderm/src/internal/whatever"
        
              # packages
              "example.com/foo/bar"
              "github.com/whatever/whatever/foo"
           )
        
        People/tools will remove the newlines or mix in local packages with upstream packages, and I decided not to care. I'm pretty sure nobody else cares.
  • lolinder 3 hours ago

    This is Microsoft catching up to what JetBrains has had all along (in their paid products). There's DataGrip but I was also using all these features (minus the AI stuff) in IntelliJ Ultimate and PyCharm 5+ years ago.

    The main difference is that JetBrains supports a bunch of databases, not just one.

    • WorldMaker 2 hours ago

      Microsoft has had official Microsoft SQL Server, Azure Storage, CosmosDB and more extensions for VS Code for a long while now. The surprise is building an official branded Postgres extension rather than leaving that to all the (many) third party and/or open source extensions. I suppose it is a nice side-effect of "AI all the things" efforts that "GitHub Copilot support" was enough reason to grab resources for a postgres query editor and other tools.

      (I thought it was particularly nice when you could install most to the VS Code DB extensions standalone as "Azure Data Studio"; you can build separate VS Code profiles for your coding and DBA hats of course, but it's not quite the same feel as launching a separate, dedicated application. Though "Azure Data Studio" was often overlooked because it worked just fine on non-Azure hosted databases.)

  • conradfr 2 hours ago

    You click on the button labeled database in the right-hand side panel.

wiseowise 3 hours ago

Let me guess: proprietary, like Pylance, and unavailable in VSCodium?

SomaticPirate 3 hours ago

I still think Jetbrains has the gold standard in IDE - Database interaction

  • tdhz77 3 hours ago

    Interesting in knowing why you think that

    • newlisp 2 hours ago

      Datagrip, as an extension, lets you work with SQL, highlighting, autocompletion, and more, inside non-SQL files, such as your programming language files. I think they call this 'language injection'.

    • leosanchez 3 hours ago

      It even lints your SQL queries written in other languages. Truly gold standard.

      • bni an hour ago

        And autocompletes, syntax highlight it. I couldn't imagine being without this.

  • mrits 3 hours ago

    I've been using DataGrip for a few weeks and admit it is a nice upgrade to DBVisualizer that I've been using for 10 years. The intellisense and features like being able to select the query in the current window are big time savers for me. I'm still on a trial and not certain I'll purchase it just because things are moving so fast in this field. I feel like not having it in my VSCode Agent loop is a huge negative at this point

prmph 2 hours ago

[flagged]

codingjerk 2 hours ago

Looks promising, but I'll probably stick to `psql`

  • maxluk 22 minutes ago

    Would you be interested if this extension supported all of the psql commands directly in the vscode editor?

  • dpflan 2 hours ago

    I wonder about people’s development workflows. If you are using a tool like this, how much time are you spending in the command-line (where all such tools can be interfaced)? Are most tools used wrapped in some layer like this?

    • deadbabe an hour ago

      There’s a lot of developers that are scared of the command-line. Truth is you don’t really need these IDEs if you truly know SQL and your database, writing queries isn’t difficult. Keeping a file with common queries isn’t hard either. But most developers just keep a very shallow pool of knowledge and lean into ORMs etc.

      • homebrewer 29 minutes ago

        I am very comfortable in the command line and still work with databases in IDEA. It gives you:

        — autocompletion for everything — table/function names, types; very helpful on projects with hundreds to thousands of tables

        — navigation ("jump to referenced table", "find foreign keys to this column", etc)

        — data export in two dozen formats (configurable)

        — exactly the same UI for working with 30 database engines (or however many it supports, I'm too lazy to count). Especially helpful with databases that have atrocious CLI clients, like Oracle.

        — a nice tree-structured view of your database; or you can generate a (possibly vector) diagram for the rare case when that helps

        — high quality autoformatter that works for every SQL dialect it supports, and in the same way

        — minor things like the ability to extract a subquery with a couple of key presses, or rename a table alias

        Probably something else I'm forgetting.

        Saving a couple of keystrokes when writing SQL has little to do with it.