Postgres Language Server offers LSP, CLI, HTTP, and WebAssembly access to PostgreSQL-aware completion, diagnostics, formatting, type checking, and migration linting built on libpgquery.
Overview
Postgres Language Server is a toolchain for Postgres-focused development built on the same libpgquery parser PostgreSQL uses, aiming for full syntax compatibility. Features surface through the Language Server Protocol, a command-line interface, HTTP APIs, and a WASM module with a transport-agnostic client-server split.
Implemented capabilities include autocompletion, hover help, inlay hints, semantic highlighting, syntax diagnostics, SQL type checking, formatting, migration linting, database linting, and PL/pgSQL support as described in current release notes.
Documentation covers IDE setup, connecting to databases, suppressing rules, integrating with version control, and running checks in continuous integration. The Supabase community maintains the project with publicly versioned releases.
Contributors can follow architecture and contributing guides for extending rules or adding editor integrations.
Key features
- LSP autocompletion and hover
- Syntax and type diagnostics
- SQL formatting
- Migration linting
- Database lint rules
- PL/pgSQL support
- CLI and HTTP interfaces
- libpgquery parser base
Use cases
- IDE SQL editing for Postgres
- CI migration validation
- Team SQL style enforcement