pg_query_go

(β˜… 854)

Go library to parse and normalize SQL queries using the PostgreSQL query parser

  • .gitignore
  • benchmark_test.go
  • CHANGELOG.md
  • fingerprint_test.go
  • go.mod
  • go.sum
  • is_utility_test.go
  • LICENSE
  • LICENSE.POSTGRESQL
  • Makefile
  • makefuncs.go
  • normalize_test.go
  • parse_test.go
  • pg_query.go
  • pg_query.pb.go
  • README.md
  • split_test.go
  • summary_test.go

# Installation Guide

1. Get the code
git clone https://github.com/pganalyze/pg_query_go

Downloads the entire project code from GitHub to your computer.

cd pg_query_go

Moves into the project folder you just downloaded.

2. Go

Medium Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Go The Go compiler and toolchain.
$ go run main.go

Runs the Go program directly without a separate build step.

go build -a

Compiles the Go program into an executable.

βœ… If the build finishes without errors, it worked. If you used go run ., check the terminal output.

Pulled directly from this repo's README.

3. Make

Medium
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
make

Compiles the code based on the generated build configuration to produce an executable.

βœ… If it finishes without errors, it worked. Try running the generated executable directly.
// repository documentation