Live data from Hacker News

Postgres IDE in VS Code

techcommunity.microsoft.com

271–280 of 433 posts

Re: Postgres IDE in VS Code

#271

Earlier quoted context omitted.

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

The schema in the db should be the source of truth and an MCP server like that is the most flexible, can work with any ORM set up

Re: Postgres IDE in VS Code

#272
post #260

Earlier quoted context omitted.

Isn't it a problem with many-to-many relationships in relational algebra? You have to have this artificial table to relate things in many-to-many way. How would you display it in a better way?

The tables should be better ordered. "speakers" is obviously the primary table here and should be top left. The "session_speakers" should be between it and the table it maps "sessions." Then "reviews" and "events" on the bottom. There's an obvious "top end" and "bottom end" of this structure that this graph completely gets wrong. You could argue that "events" are primary in which case just switch the order of that an…

That's great feedback! Thank you! I wonder if we can auto-layout in the way you describe. Should be doable. We will look into it.

Re: Postgres IDE in VS Code

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

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…

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.

Re: Postgres IDE in VS Code

#275
post #247

Earlier quoted context omitted.

PM on the project here - The results from the query are generally not used by the LLM. In agent mode though, during query planning, the agent may retrieve sample of the data to improve precision of the queries. For example, getting distinct values from dimensional table to resolve filter condition from natural language statement.

Thanks. I worry about these kind of tools connecting to production databases.. Especially considering how easy it is to switch out LLM endpoints, where that data is going, how it is retained, the context etc becomes a bit of a privacy nightmare..

Absolutely valid concern. Our extension connects to LLMs through Github Copilot. Github Copilot is Microsoft product and offers variety of enterprise plans, which enables your IT to approve what can be used for what kind of data. This gives you a clear path towards compliance with your enterprise requirements.

Re: Postgres IDE in VS Code

#276

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.

[deleted]

Re: Postgres IDE in VS Code

#278

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’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?

Re: Postgres IDE in VS Code

#280

Earlier quoted context omitted.

> non-disclaimable liabilities So you are saying that MIT/ISC/GPL/Apache2 and all the other OSS licenses do open you up to liabilites?

I am saying being a merchant in the field of software and supply software opens you up to liabilities, and saying “Not my responsibility” does not, in most jurisdictions, actially completely shield you from all of them, correct. This may also, to a lesser extent, be true of people who are not merchants in the field of the product supplied. It’s not the license creating the liability, in either case.

So you are saying that the parts of for example MIT or similar licenses that in clear terms say:

"THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."

do not constitute something that frees you from those liabilities?

Cause if so I think basically most of open-source would just shut down tomorrow.

Post reply on HN