Pglast
PostgreSQL Languages AST and statements prettifier: master branch covers PG10, v2 branch covers PG12, v3 covers PG13, v4 covers PG14, v5 covers PG15, v6 covers PG16, v7 covers PG17, v8 covers PG18
Install / Use
/learn @lelit/PglastREADME
.. -- coding: utf-8 -- .. :Project: pglast — PostgreSQL Languages AST .. :Created: mer 02 ago 2017 14:49:24 CEST .. :Author: Lele Gaifax lele@metapensiero.it .. :License: GNU General Public License version 3 or later .. :Copyright: © 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Lele Gaifax ..
======== pglast
PostgreSQL Languages AST and statements prettifier
:Author: Lele Gaifax
:Contact: lele@metapensiero.it
:License: GNU General Public License version 3 or later__
:Status: |build| |doc| |codecov|
:Version: 7__
__ https://www.gnu.org/licenses/gpl.html __ https://pglast.readthedocs.io/en/v7/development.html#history
.. |build| image:: https://github.com/lelit/pglast/actions/workflows/ci.yml/badge.svg?branch=v7 :target: https://github.com/lelit/pglast/actions/workflows/ci.yml :alt: Build status .. |doc| image:: https://readthedocs.org/projects/pglast/badge/?version=v7 :target: https://readthedocs.org/projects/pglast/builds/ :alt: Documentation status .. |codecov| image:: https://codecov.io/gh/lelit/pglast/branch/v3/graph/badge.svg?token=A90D8tWnft :target: https://codecov.io/gh/lelit/pglast :alt: Test coverage status
This is a Python 3 module that exposes the parse tree of a PostgreSQL__ statement (extracted
by the almost standard PG parser repackaged as a standalone static library by libpg_query__)
as set of interconnected nodes, usually called an abstract syntax tree.
__ https://www.postgresql.org/ __ https://github.com/pganalyze/libpg_query
See a more detailed introduction__ in the documentation_.
__ https://pglast.readthedocs.io/en/v7/introduction.html
Installation
As usual, the easiest way is with pip::
$ pip install pglast
Alternatively you can clone the repository::
$ git clone https://github.com/lelit/pglast.git --recursive
and install from there::
$ pip install ./pglast
Development
There is a set of makefiles implementing the most common operations, a make help will
show a brief table of contents. A comprehensive test suite, based on pytest__, covers__ nearly
99% of the source lines.
__ https://docs.pytest.org/en/latest/ __ https://codecov.io/gh/lelit/pglast/branch/v7/
Documentation
Latest documentation is hosted by Read the Docs__ at https://pglast.readthedocs.io/en/v7
__ https://readthedocs.org/
Related Skills
feishu-drive
339.3k|
things-mac
339.3kManage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database)
clawhub
339.3kUse the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com
yu-ai-agent
2.0k编程导航 2025 年 AI 开发实战新项目,基于 Spring Boot 3 + Java 21 + Spring AI 构建 AI 恋爱大师应用和 ReAct 模式自主规划智能体YuManus,覆盖 AI 大模型接入、Spring AI 核心特性、Prompt 工程和优化、RAG 检索增强、向量数据库、Tool Calling 工具调用、MCP 模型上下文协议、AI Agent 开发(Manas Java 实现)、Cursor AI 工具等核心知识。用一套教程将程序员必知必会的 AI 技术一网打尽,帮你成为 AI 时代企业的香饽饽,给你的简历和求职大幅增加竞争力。
