Postgres Language Server: Implementing the Parser

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • sqlite-parser

    An ANTLR4 grammar for SQLite statements. (by bkiers)

  • > Where is the SQLite test suite, please?

    Here's the scrapped tests:

    https://github.com/bkiers/sqlite-parser/tree/master/src/test...

    I didn't find a scrapper. I was cobbling together my own scrapper when I stumbled onto these files. My scrapper is turrible.

    This SQLite grammar is included in grammars-v4. Looks like a copy vs a fork. I don't know why these tests weren't copied too.

    > please don't try and write your own grammar

    I must be a masochist.

    Aside: Ages ago, during an job interview, when asked to talk about some of my prior work, I mentioned my SQL grammar. The self-described "bar raiser" cut me off, dismissed my effort as trivial, because the grammar generator (ANTLR) does all the work. I had no response.

  • squawk

    🐘 linter for PostgreSQL, focused on migrations

  • that is definitely the goal, both a formatter and a linter. we want to add something like squawk directly to the language server, so you get eslint-like dx. with the ast and the database schema in the data model, you can basically add any rule you like.

    [0] https://github.com/sbdchd/squawk/tree/master

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • grammars-v4

    Grammars written for ANTLR v4; expectation that the grammars are free of actions.

  • Where is the SQLite test suite, please? I'd be very interested.

    There are already SQL grammars, check https://github.com/antlr/grammars-v4 specifically in here I think https://github.com/antlr/grammars-v4/tree/master/sql I contributed to one of them, and I wrote my own for some personal work. Be warned, it's very involved, very complex and MSSQL is rather ill-defined.

    Names bracket identifiers) in SQL are bloody awful. Sometimes square brackets are even compulsory, and why you can usually replace [...] with the SQL standard "..." , not always! Trust me, it gets worse.

    I don't find antlr grammars to be brittle, and while they can lose in performance (by how much I don't know, perhaps quite considerably) they are very easy to maintain and I am very fortunate to have antlr to work with.

  • superscribe

    Open source automatic API and admin for relational databases

  • Sure, still a WIP but it's getting there [1]

    [1] https://github.com/superscribe-io/superscribe/blob/developme...

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts