# uqa-pg-query upstream pin
This crate is an imported snapshot of the UQA Engine PostgreSQL 18 parser chain.
- Wrapper: `https://github.com/jaepil/pg_query.rs` at `50329932e504c8ad96208a3bbafdec7d9fdaf81d`
- C library: `https://github.com/jaepil/libpg_query` at `a5356d05a1269f2982b906611d7e545c550bb369`
The wrapper is MIT. `libpg_query` is BSD-3-Clause and includes PostgreSQL server source under the PostgreSQL license. See `LICENSE` and `LIBPG_QUERY-LICENSE`.
The package name is `uqa-pg-query` because crates.io already has `pg_query`. The library name remains `pg_query` so UQA Engine compiler code keeps `use pg_query::...`.
Do not edit imported sources to change parser behavior. Review and test parser updates in the two upstream repositories first, then run:
```sh
python3 scripts/sync-uqa-pg-query.py --source PATH_TO_CHECKED_OUT_WRAPPER
```
The sync script normalizes imported Rust sources with the workspace-pinned rustfmt before writing `SHA256SUMS`; the checksums therefore describe the deterministic post-rustfmt snapshot rather than the upstream files byte for byte. CI verifies both the checksums and workspace-wide rustfmt. A parser update must change the recorded revisions in this file, the script constants, and the checksum list in the same change.