Skip to content

Consider switching to libpg_query for faster builds (vs PostgreSQL source download) #28

Open
@lfittl

Description

@lfittl

First of all, thanks for the note on pganalyze in the README & happy to that you've found that blog post back then useful!

I've actually recently optimized that approach a bit more, so you don't have to download and build all of PostgreSQL when all you want is access to the parser.

You can find the latest in this C library: https://github.com/lfittl/libpg_query

See pg_query.h for how to access it, and src/postgres for the parts of the source it uses - extracted by this script using LLVM/clang.

I could also see adding an explicit pg_syntax_check or similar, to avoid unnecessary parse tree JSON generation. Let me know if that'd be useful :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions