{"library":"plpgsql-parser","type":"library","category":null,"description":"The `@pgsql/parser` package is a core component within a comprehensive monorepo for PostgreSQL Abstract Syntax Tree (AST) parsing, manipulation, and code generation. It provides a robust, multi-version PostgreSQL parser capable of converting SQL and PL/pgSQL queries into hydrated ASTs, supporting PostgreSQL versions 13 through 17. The current stable version for `@pgsql/parser` is approximately 17.0.4, with active development and frequent updates across the monorepo's packages, such as `@pgsql/deparser` (around 0.7.3). Key differentiators include its direct integration with `libpg-query` (the actual PostgreSQL parser exposed for Node.js), offering high fidelity to PostgreSQL's native parsing logic. It also ships with extensive TypeScript type definitions (`@pgsql/types`), utilities for programmatic AST construction (`@pgsql/utils`), and traversal tools (`@pgsql/traverse`), making it suitable for advanced static analysis, query transformation, and code generation tasks. This library aims to provide a complete toolkit for working with PostgreSQL at the AST level.","language":"javascript","status":"active","version":"0.5.8","tags":["javascript","sql","postgres","postgresql","pg","plpgsql","query","ast","parser","typescript"],"install":[{"cmd":"npm install plpgsql-parser","imports":["import { parse } from '@pgsql/parser';","import { deparse } from '@pgsql/deparser';","import type { SelectStmt } from '@pgsql/types';"]},{"cmd":"yarn add plpgsql-parser","imports":[]},{"cmd":"pnpm add plpgsql-parser","imports":[]}],"homepage":null,"github":"https://github.com/constructive-io/pgsql-parser","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/plpgsql-parser","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/plpgsql-parser/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Sat Jul 18","install_tag":null}}