Live data from Hacker News

Postgres IDE in VS Code

techcommunity.microsoft.com

151–160 of 433 posts

Re: Postgres IDE in VS Code

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

Re: Postgres IDE in VS Code

#152
post #85

Earlier quoted context omitted.

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?

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.

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.

Re: Postgres IDE in VS Code

#153

Earlier quoted context omitted.

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

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.

It's the contemporary version of the second E [0], if you will.

[0]: https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguis...

Re: Postgres IDE in VS Code

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

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.

>MS SQL server is a legacy system

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

Re: Postgres IDE in VS Code

#156

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…

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

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

Re: Postgres IDE in VS Code

#159

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

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.

Re: Postgres IDE in VS Code

#160

Is there a similar extension for MySQL in VS Code?

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