from Hacker News

Postgres IDE in VS Code

by Dowwie on 5/23/25, 3:12 PM with 407 comments

  • by seveibar on 5/23/25, 4:29 PM

    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

  • by pier25 on 5/23/25, 3:38 PM

    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.

  • by WuxiFingerHold on 5/24/25, 3:48 AM

    >> 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).

  • by qntmfred on 5/23/25, 3:54 PM

    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
  • by impalallama on 5/23/25, 3:51 PM

    Biggest thing that JetBrains has over VSCode for me was their very clean built in database tooling
  • by FajitaNachos on 5/23/25, 4:25 PM

    Postico has always been my defacto way to interact with Postgres. Curious if there are any Postico users who have tried this yet.
  • by pamelafox on 5/23/25, 9:49 PM

    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

  • by Toritori12 on 5/23/25, 4:20 PM

    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...).
  • by pbw on 5/23/25, 8:53 PM

    Is there a similar feature available for SQLite? Will there need to be a totally new extension for every DB, or is there a shared portion?
  • by Ericson2314 on 5/23/25, 7:13 PM

    Microsoft Access meets PostgreSQL, 3 decades later?
  • by bdcravens on 5/23/25, 4:51 PM

    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.
  • by zamacho on 5/23/25, 5:38 PM

    Is there a similar extension for MySQL in VS Code?
  • by wolframhempel on 5/23/25, 3:38 PM

    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
  • by ryanmccullagh on 5/23/25, 8:46 PM

    Remember the old adage, embrace, extend, extinguish.
  • by weitendorf on 5/23/25, 4:26 PM

    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.

  • by illuminated on 5/23/25, 7:30 PM

    I wonder how this compares to pgModeler (https://pgmodeler.io/) which I've been using the most in the recent years, would love is someone who had tried both could share some observations.
  • by pgwhalen on 5/23/25, 4:01 PM

    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.
  • by tombert on 5/23/25, 7:20 PM

    I've never used any of these kind of graphical SQL editors. I'm reasonably ok with SQL but I've always just done text queries.

    Does anyone here feel that the graphical editors actually save them time or make their lives easier?

  • by todotask2 on 5/23/25, 6:33 PM

    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.

  • by d0100 on 5/23/25, 8:23 PM

    So it's just Azure Data Studio where it lacks SSH tunneling...

    I got my hopes up for nothing

  • by jasonthorsness on 5/23/25, 4:01 PM

    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!
  • by nico on 5/23/25, 4:07 PM

    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

  • by alexpham14 on 5/24/25, 3:03 PM

    I’m truly grateful for this. It’s really helpful because I love VSCode, and most of my projects use Postgres. The decision to prioritize Postgres support was quite unexpected.
  • by mohsen1 on 5/24/25, 1:19 PM

    This is not available in Cursor. Extension ID "ms-ossdata.vscode-pgsql" returns no results. I wonder if Microsoft is blocking VSCode forks from having this extension?
  • by nodesocket on 5/23/25, 6:03 PM

    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.
  • by nsonha on 5/23/25, 10:29 PM

    Shame it's not a generic thing that can work with MySQL
  • by didip on 5/23/25, 6:46 PM

    This is amazing.

    I imagine later LLM have access to my table metadata and then perhaps down the road, LLM can suggest me better queries based on execution plans that it saw.

  • by scirob on 5/23/25, 8:25 PM

    the copilote being aware of postgres schema is a thing I manually have to deal with in cursor rules. I keep all the SQL DLL files that created any table in context but then also its best to have cursor rules to tell it to use one orm if possible
  • by cebert on 5/23/25, 4:57 PM

    I wonder how well this IDE works if you use AWS or GCP instead of Azure.
  • by huqedato on 5/23/25, 3:37 PM

    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.
  • by dankobgd on 5/24/25, 11:06 AM

    Tried it, queries work but i can't even show the columns and other meta data. it says no connnection even though i have a connection to do queries.
  • by robertlagrant on 5/23/25, 8:30 PM

    > Password-less authentication with Entra Id

    I don't understand why the first four points under this heading are basically the same.

  • by saqadri on 5/23/25, 4:26 PM

    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
  • by polishdude20 on 5/23/25, 8:22 PM

    Just tried it, wish there was better refactoring tools available!

    If love for there to me a "rename variable" feature.

  • by deelowe on 5/23/25, 5:19 PM

    Does something like this exist for mysql?
  • by VeejayRampay on 5/23/25, 6:57 PM

    I don't really understand the UI though, there's no way to provide a host

    am I the only one to have that problem?

  • by abetaha on 5/23/25, 4:43 PM

    This looks great. Would all the functionality work if the databases are hosted on other cloud providers?
  • by highwaylights on 5/23/25, 3:37 PM

    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.

  • by deepsun on 5/23/25, 8:05 PM

    Graphical schema image generation was in IntelliJ for like 15 years at least? Since the times with all the craze about UML "disrupting" software engineering.
  • by hn1986 on 5/24/25, 1:36 AM

    I wonder if this will work with Redshift , which is based on Postgres?
  • by jtougas on 5/24/25, 11:29 AM

    I used Azure Data Studio with SQL Server for a while—decent, but still clunky. I believe this plugin is the evolution of that, so it’s probably solid too—but can't beat out what I'm currently using since it targets only Postgres.

    It’s going to be tough to beat SQLTools for Sublime Text (https://code.mteixeira.dev/SublimeText-SQLTools/). It’s simple, fast, does the basics right, and crucially, works for many of the usual suspects.

    Most IDEs try to do everything and fail, yet only target one db vendor. They’re _all_ bloated and buggy, with endless trees and menus, bells and whistles. Results grids are slow, copy/paste is janky, formatting is never quite right—or outright misleading.

    SQLTools stays out of the way and just works.

    ...also, I don’t want AI-powered nonsense. I’ll reach for that when I need it. Get off my lawn.

  • by herpdyderp on 5/23/25, 11:03 PM

    Too bad I switched to PGlite for local dev (not really because I love PGlite). I unfortunately don't see any PGlite VS Code extensions.
  • by barfolomew on 5/23/25, 4:46 PM

    I will be using this. 100%. very handy
  • by 0x8j0rn4r80r93 on 5/23/25, 5:43 PM

    This is great!
  • by rubabu on 5/23/25, 5:21 PM

    does this work for non-Azure?
  • by ajsharp on 5/24/25, 5:53 AM

    and just like that, 90% of the reason i pay for a jetbrains license just...disappeared
  • by mrits on 5/23/25, 3:55 PM

    I'm sure nobody cares, but I just independently stumbled upon this an hour ago and wondered why more people haven't used it.
  • by dunefox on 5/24/25, 3:00 PM

    "You don't have permission to access url"
  • by codingjerk on 5/23/25, 4:16 PM

    Looks promising, but I'll probably stick to `psql`
  • by kstrauser on 5/23/25, 3:55 PM

    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...

  • by someothherguyy on 5/23/25, 3:39 PM

  • by _ink_ on 5/23/25, 3:48 PM

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

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

  • by wiseowise on 5/23/25, 3:31 PM

    Let me guess: proprietary, like Pylance, and unavailable in VSCodium?
  • by SomaticPirate on 5/23/25, 3:44 PM

    I still think Jetbrains has the gold standard in IDE - Database interaction
  • by qwertywert_ on 5/23/25, 6:31 PM

    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.
  • by helpfulContrib on 5/23/25, 5:46 PM

    Has there been a final solution to the VSCode phoning-home problem?

    Last time I tried to use it in my environment, it triggered too many 'external network requests' for the liking of our IT guy. We relegated it to the "Do Not Use" pile as a result.

    Has this been resolved? Nobody in my team wants to use an IDE that sends data back to its masters ..

  • by theappsecguy on 5/23/25, 10:47 PM

    Ages behind Jetbrains and more of electron dumpster fire. No thanks
  • by jenny91 on 5/23/25, 6:13 PM

    Glad to see them releasing it under an MIT license.
  • by getgalaxy on 5/23/25, 4:21 PM

    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