SkillAgentSearch skills...

Psqlparse

A python module that gives access to PostgreSQL's query parser, for turning SQL into a parse tree.

Install / Use

/learn @alculquicondor/Psqlparse
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

psqlparse

Build Status

This project is not maintained anymore. If you would like to maintain it, send me a DM in twitter @alculquicondor.

This Python module uses the libpg_query to parse SQL queries and return the internal PostgreSQL parsetree.

Installation

pip install psqlparse

Usage

import psqlparse
statements = psqlparse.parse('SELECT * from mytable')
used_tables = statements[0].tables()  # ['my_table']

tables is only available from version 1.0rc1

Development

  1. Update dependencies
git submodule update --init
  1. Install requirements:
pip install -r requirements.txt
  1. Build Cython extension
USE_CYTHON=1 python setup.py build_ext --inplace
  1. Perform changes

  2. Run tests

pytest

Maintainers

View on GitHub
GitHub Stars164
CategoryData
Updated7mo ago
Forks38

Languages

Python

Security Score

87/100

Audited on Aug 29, 2025

No findings