Would love to get this plugged into intellij/datagrip
A Language Server for Postgres
11–20 of 24 posts
Re: A Language Server for Postgres
#12Earlier quoted context omitted.
Similar. But this looks like it requires generating explicit migrations. The equivalent would be if every time you wanted to make a change to your terraform, you had to plan and save the generated plan file to your repository. Still not quite the right workflow IMO. I think TF nails it and that SQL things are held back by legacy thinking in the space.
From their docs [1] it seems that they support a workflow similar to Terraform. [1]: https://atlasgo.io/declarative/apply
Re: A Language Server for Postgres
#13Re: A Language Server for Postgres
#14As someone who’s written a ton of PL/pgSQL code recently, I have been saving all my functions and their subsequent revisions in database migration files (Supabase). This feels like such a huge step backwards compared to browsing a well structured codebase with namespaces and modules. I know that Postgres provides schemas, and I am using them to a limited extent, but I am really speaking towards just having a tree ori…
Regarding stored procs/funcs in particular and managing them like a codebase using a declarative tool, I have a blog post about this at https://www.skeema.io/blog/2023/10/24/stored-proc-deployment... – and although my product is specific to MySQL, a lot of the concepts in the first half of that post are generic and apply to any declarative tool. Some FOSS solutions to look into for Postgres include sqldef and Tusker.
Re: A Language Server for Postgres
#15As someone who’s written a ton of PL/pgSQL code recently, I have been saving all my functions and their subsequent revisions in database migration files (Supabase). This feels like such a huge step backwards compared to browsing a well structured codebase with namespaces and modules. I know that Postgres provides schemas, and I am using them to a limited extent, but I am really speaking towards just having a tree ori…
Re: A Language Server for Postgres
#16Re: A Language Server for Postgres
#17Would love to get this plugged into intellij/datagrip
I’m interested in this for the opposite reason, jetbrains have fantastic sql support but I’d rather have a lang server that gives me a ‘good enough’ experience in the substantially faster vscode or zed.
Re: A Language Server for Postgres
#18As someone who’s written a ton of PL/pgSQL code recently, I have been saving all my functions and their subsequent revisions in database migration files (Supabase). This feels like such a huge step backwards compared to browsing a well structured codebase with namespaces and modules. I know that Postgres provides schemas, and I am using them to a limited extent, but I am really speaking towards just having a tree ori…
Re: A Language Server for Postgres
#19As someone who’s written a ton of PL/pgSQL code recently, I have been saving all my functions and their subsequent revisions in database migration files (Supabase). This feels like such a huge step backwards compared to browsing a well structured codebase with namespaces and modules. I know that Postgres provides schemas, and I am using them to a limited extent, but I am really speaking towards just having a tree ori…
While developing, srtd can hot/live reload your templates into the local db when changed.
I built this to scratch my own itch, and it’s been working VERY well for us. Huge DX benefits, and it’s made code reviews a LOT easier, since the reviewer can focus on what’s actually changed.
Re: A Language Server for Postgres
#20As someone who’s written a ton of PL/pgSQL code recently, I have been saving all my functions and their subsequent revisions in database migration files (Supabase). This feels like such a huge step backwards compared to browsing a well structured codebase with namespaces and modules. I know that Postgres provides schemas, and I am using them to a limited extent, but I am really speaking towards just having a tree ori…
https://github.com/t1mmen/srtd might help here. The general idea is to define functions/policies/etc as «SQL templates», your source of truth. The templates built into Supabase migrations. While developing, srtd can hot/live reload your templates into the local db when changed. I built this to scratch my own itch, and it’s been working VERY well for us. Huge DX benefits, and it’s made code reviews a LOT easier, since…