Live data from Hacker News

Postgres IDE in VS Code

techcommunity.microsoft.com

71–80 of 433 posts

Re: Postgres IDE in VS Code

#71

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://marke…

[deleted]

Re: Postgres IDE in VS Code

#75
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 , 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.

Re: Postgres IDE in VS Code

#77
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

Re: Postgres IDE in VS Code

#78

Earlier quoted context omitted.

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 recent…

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/q…

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.

Re: Postgres IDE in VS Code

#79

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 tex…

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
Post reply on HN