A Language Server for Postgres

  • Previously: Postgres Language Server (963 points, 121 comments, 2023) (https://news.ycombinator.com/item?id=37020610)

  • As 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 oriented set of files on disk like I would with TypeScript, Golang, etc… and a way to refresh this tree against what’s currently active in my database. Had anyone else had a similar issue or better still, resolved it?

  • My pipe dream is a terraform-like, delcarative, cross-dialect way to manage database schemas/code.

    Sql Server kind of gets there with the .sqlproj and DACPAC stuff but it is quite fiddlesome to setup. I've only seen liquibase as a semi-close alternative in the FOSS space and it really just works with explicitly defined migration chains AFAICT rather than semantic diff and change generation.

    I think if anyone is going to bring something like that to market, even for just postgres, it will be SupaBase.

  • It's past time to move beyond LSP. However I'm glad to see more language servers because that means there will be more who will want to improve the situation.

    Edit: they're right with me on this. From the README: "It is built on a Server-Client architecture with a transport-agnostic design." Way to go!

  • Can we get an (easy to use) vscode debugger for plpgsql next?

  • Would love to get this plugged into intellij/datagrip