Ross ROSS = Recommend OSS · open-source software intelligence for agents

pganalyze/libpg_query

C library for accessing the PostgreSQL parser outside of the server environment observed · 2026-08-28

github.com/pganalyze/libpg_query · C · BSD-3-Clause (permissive) observed · 2026-08-28

Health v2 · maintenance only

90/100

  • Activity 99
  • Release rhythm 72
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: 71.0
  • age_days: 4043
  • days_rel: 105
  • days_push: 8
  • n_releases_24m: 7

Full methodology

Adoption not part of the score

1478 stars · 226 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

libpg_query is a C library that exposes PostgreSQL's actual SQL parser so applications can parse SQL queries and obtain the internal PostgreSQL parse tree outside the server. It also exposes the PostgreSQL lexer for tokenizing queries, and serves as the base for language bindings like pg_query.go, pglast, and pgsql-parser.

Use cases

  • parse postgres sql queries into a parse tree
  • validate sql syntax without running a postgres server
  • build a sql linter or formatter for postgresql
  • tokenize sql queries for syntax highlighting
  • analyze or rewrite postgres queries programmatically
  • build language bindings for the postgres parser

When to choose

  • you need PostgreSQL-exact parsing behavior for SQL analysis, linting, or rewriting
  • you are building a tool in C or a binding on top of the PostgreSQL grammar
  • you cannot run or embed a full PostgreSQL server just to parse queries

When to avoid

  • you need a generic SQL parser for multiple dialects rather than PostgreSQL specifically
  • you need to execute queries, not just parse them
  • you want a pure high-level-language parser without a C build dependency

Facets

library · maturity active

parser developer-tools databases parsers developer-tools windows cross-platform c postgresql sql-parser parse-tree sql-linting query-analysis linux macos

1 source

Member repositories

RepositoryRoleHealth v2
pganalyze/libpg_querymain90

For agents

markdown · JSON · MCP: product_card(name="pganalyze/libpg_query")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem