tree-sitter-postgres, libpgfmt, pgfmt, and libpgdump

Поиск
Список
Период
Сортировка
Искать

tree-sitter-postgres, libpgfmt, pgfmt, and libpgdump

От:
"Gavin M. Roy via PostgreSQL Announce" <announce-noreply@postgresql.org>
Дата:
 

tree-sitter-postgres, libpgfmt, pgfmt, and libpgdump

I've been rebuilding some internal tools and open source projects in Rust and have a few things to share:

tree-sitter-postgres — A Tree-sitter grammar for Postgres (SQL + PL/pgSQL) that uses codegen to convert directly from Postgres' Bison source into a Tree-sitter grammar.

libpgfmt — A Rust library for formatting SQL and PL/pgSQL, with support for multiple style presets: aweber, dbt, gitlab, kickstarter, mozilla, mattmc3, and river.

pgfmt — A CLI tool for formatting and lint-checking SQL and PL/pgSQL, built on libpgfmt.

libpgdump — A Rust library for reading and writing PostgreSQL dump files that supports custom, directory, and tar formats. This is a port of my pgdumplib project and will be used in the next version of pgdumplib.

There are several tree-sitter projects for Postgres including both SQL and PL/PgSQL. What I believe differentiates tree-sitter-postgres from the others is that it is entirely driven by code generation from the Postgres source. When a new major version drops that may add new keywords or other changes, it should be very easy to keep the grammar up to date.

libpgfmt and pgfmt were primarily built to support the AWeber style guide which derives from sqlstyle.guide, but was built to support multiple styles.

This email was sent to you from Gavin M. Roy. It was delivered on their behalf by the PostgreSQL project. Any questions about the content of the message should be sent to Gavin M. Roy.

You were sent this email as a subscriber of the pgsql-announce mailinglist, for the content tag Related Open Source. To unsubscribe from further emails, or change which emails you want to receive, please click the personal unsubscribe link that you can find in the headers of this email, or visit https://lists.postgresql.org/unsubscribe/.
 
FAQ