Skip to content
P

Postgresparser

ANTLR-based PostgreSQL query parser for Go

by ValkDBFree

#3732in Developer Tools
0In stores

Description

postgresparser is a pure-Go PostgreSQL query parser. It reads SQL and returns a structured intermediate representation that lists the tables…

Highlights

  • Extracts tables, columns, joins and CTEs
  • Parses SELECT, INSERT, UPDATE, DELETE and MERGE
  • Parses CREATE, ALTER and DROP statements
  • Pure Go with no cgo dependency
  • Structured IR with no query execution

Ratings & Reviews

No ratings yet

Be the first to rate Postgresparser.

People also visit

P

postgres

Any PostgreSQL database work

AI Skills
Get
S

Slowql

Next-generation SQL static analyzer written in Rust

Developer Tools
Launch
C

Collector

pganalyze statistics collector for gathering PostgreSQL metrics and log data

Developer Tools
Launch
P

postgres-drizzle

Write or review PostgreSQL schemas, queries, migrations, and Drizzle ORM code

AI Skills
Get
T

Tables To Go

Easily convert your database tables to structs

Developer Tools
Launch
P

postgres-pro

Optimizing PostgreSQL queries, configuring replication

AI Skills
Get

Postgresparser FAQ

What is postgresparser?

A Go library that parses PostgreSQL SQL into a structured representation of the tables, columns and clauses it touches, without running the query.

Does it need cgo?

No. The README says it is pure Go, so it builds with go build wherever CGO_ENABLED=0 is required.

What can I build with it?

The README lists query linting, dependency extraction, migration tooling, audit logging, query rewriting and index advisors.

How fast is it?

The README says most queries parse in 70 to 350 microseconds with SLL prediction mode.

What are the best Postgresparser alternatives?

Popular alternatives to Postgresparser include Slowql, Collector and Tables To Go. See all Postgresparser alternatives

Developer Stuff

Badges