supabase-community/postgres-language-server
49.3
Weak · 14 November 2026
129.5k
lines of production code
Rust
primary language
5
measurements over time
What this system is
Features
Add proc-macro crate for deriving Merge and Partial configuration structs
Introduces the \pgls\_configuration\_macros\ crate, providing two new derive macros: \Merge\ and \Partial\. The \Merge\ macro implements the \Merge\ trait for enums, structs, and newtypes, allowing configuration objects to be combined by overwriting fields. The \Partial\ macro generates a corresponding \Partial{StructName}\ struct where all fields are wrapped in \Option\, facilitating the construction of partial updates or patches for configuration objects. This new crate replaces previous biome dependencies and includes specific lint allowances for large enum variants.
_crates/pgls\_configuration\macros · high confidence
Added contact table seed data for test database
A new seed file (test-db/seed.sql) has been added to initialize the test database with a public.contact table. This table includes an auto-incrementing primary key, a timestamp for creation, and a username field, allowing tests to interact with contact records.
test-db · high confidence
Added example SQL file with user query and syntax errors
A new SQL file has been added to the examples directory containing a query to select user IDs and names for a specific ID, followed by lines containing invalid SQL syntax ('select select') and a simple 'select 1' statement.
example · high confidence
Automated CLI package generation for multi-platform WASM and native binaries
The CLI build process now includes a new script that automatically generates and configures npm packages for the Postgres Language Server. This script downloads pre-built WASM assets (pgls.js, pgls.wasm) and native binaries from GitHub releases, then creates platform-specific package directories (e.g., for Windows MSVC, macOS, and Linux glibc/musl on x86\_64 and aarch64). It updates package manifests to include the correct version and optional dependencies, ensuring users receive the appropriate binary for their OS and architecture without manual intervention.
packages/@postgres-language-server/cli/scripts · high confidence
Enhanced code actions, semantic tokens, and robustness improvements
The LSP now supports a 'fix-all' code action that applies all safe fixes to a document, preserving cursor position and folds by calculating the changed range. Semantic highlighting is introduced with support for full-document and range-based queries, using a legend of seven token types and one modifier, while gracefully skipping tokens that cannot be encoded or span multiple lines. Inlay hints and completions are more robust, filtering out items that fail position encoding rather than failing the entire response, and completions now correctly handle missing text edits. Additionally, all workspace operations (completions, formatting, hover, inlay hints, file open/change/close, and command execution) now explicitly pass a project key, and configuration handlers have been updated to use SessionHandle for async operations. Also in this area: Add inlay hints and autofix code actions for lint rules; Initial implementation of LSP server handlers.
_crates/pgls\lsp/src/handlers · high confidence
Initial PostgreSQL tokenizer implementation
The \pgls\_tokenizer\ crate introduces a new lexer for PostgreSQL SQL syntax, enabling the system to recognize and categorize SQL tokens. This tokenizer supports standard identifiers, numeric literals (including binary, octal, hexadecimal, and decimal formats with separators), and various string types such as escaped strings, Unicode escape strings, bit strings, byte strings, and dollar-quoted strings. It also handles PostgreSQL-specific features like named parameters (using \@\, \:\, and \$\ prefixes) and positional parameters (\$1\, etc.), along with line and block comments. The implementation is based on the \squawk\_lexer\ and includes comprehensive snapshot tests to verify correct tokenization behavior.
_crates/pgls\tokenizer · high confidence
Initial implementation of the PostgreSQL pretty-printer node emitters
The \pgls\_pretty\_print\ crate now includes the core emitter logic for formatting PostgreSQL SQL statements. This change introduces the \nodes\ module, which contains individual emitter functions for AST node types (such as expressions, constants, array access, and various DDL statements like \ALTER TABLE\ and \ALTER FUNCTION\). These emitters translate the internal protobuf representation of parsed SQL into formatted, human-readable text, handling syntax-specific details like operator spacing, keyword casing, and indentation. Also in this area: Fixes to SQL pretty-printing: comments, long identifiers, and layout; Align CASE branches in expanded layout.
_crates/pgls\_pretty\print/src/nodes · high confidence
Initial pretty-print code generation crate
Added the \pgls\_pretty\_print\_codegen\ crate, which provides procedural macros to generate Rust token and node-type enums from the \libpg\_query\ protobuf definitions. The build script downloads the \kwlist.h\ and \pg\_query.proto\ files for PostgreSQL 17 (libpg\_query 6.1.0) to drive this code generation, establishing the foundational parsing and formatting infrastructure for the project. Also in this area: 2 commits (0 fixes) modifying crates/pgls\_pretty\_print\_codegen; Support for formatting SQL via stdin and improved layout for comments and line breaks.
_crates/pgls\_pretty\_print\codegen · medium confidence · unverified
Initial pretty-printer code generation infrastructure
The pretty-printer module now includes generated code for group kinds, node locations, and token kinds, establishing the foundational structure for SQL formatting. This addition enables the system to track and report location metadata for AST nodes, allowing users to identify which parts of a parsed query carry positional information.
_crates/pgls\_pretty\print/src/codegen · high confidence
Initial release of @postgres-language-server/wasm package
The new @postgres-language-server/wasm package provides WebAssembly bindings for the Postgres Language Server, enabling SQL parsing, linting, formatting, and completion in browser and Node.js environments. It exposes two distinct APIs: a Workspace API for direct programmatic access to SQL tooling features, and a LanguageServer API that implements the full LSP JSON-RPC protocol for integration with editors like Monaco. The package includes configuration for TypeScript builds, Bun testing, and Playwright end-to-end tests.
packages/@postgres-language-server/wasm · high confidence
Initial release of the SQL pretty printer
The \pgls\_pretty\_print\ crate is introduced, providing a new SQL formatter that transforms parsed ASTs into formatted SQL strings. It supports configurable layout options including \Layout::Expanded\ for breaking statements across lines, \CommaStyle\ for leading or trailing commas, \LogicalOperatorPlacement\ for boolean operators, \CastStyle\ for \::\ versus \CAST(...)\, and \ClauseBodyStyle\ for clause body indentation. The formatter preserves source comments by attaching them to AST nodes and re-emitting them in the output. It also normalizes boolean expressions and join types (e.g., \CROSS JOIN\ to \INNER JOIN ON TRUE\) to ensure semantic equivalence during beta validation. Also in this area: Fixes to SQL pretty-printing: comments, long identifiers, and layout; Align CASE branches in expanded layout; Support for formatting SQL via stdin and improved layout for comments and line breaks; Fix comment placement and ALTER FUNCTION formatting. Also in this area: 12 commits (9 fixes) fixing crates/pgls\_pretty\_print.
_crates/pgls\_pretty\print/src · medium confidence · unverified
Initial repository scaffolding and development environment setup
The repository has been initialized with the core configuration files and tooling required for development. This includes a Rust toolchain specification (channel 1.88.0), a Nix flake for reproducible development environments, and a Docker Compose setup for local PostgreSQL testing. The project adopts a new JavaScript/TypeScript tooling stack, replacing previous formatters and linters with Oxc (oxlint and oxfmt) and Bun, evidenced by the addition of \.oxlintrc.json\, \.oxfmtrc.json\, and \bun.lock\. Additionally, a default configuration file (\postgres-language-server.jsonc\) is provided to define default settings for the language server, including database connection parameters and enabled features like linting and type checking.
(repo-wide) · high confidence
Introduce JSON-RPC backend for Postgres Language Server daemon
The backend-jsonrpc package now provides a client library to connect to the Postgres Language Server daemon via a JSON-RPC protocol over a local socket. This change introduces platform-specific binary resolution (supporting Windows, macOS, and Linux including musl) and implements the transport layer for sending requests and receiving diagnostics, formatting, and linting results from the remote daemon process. Also in this area: 4 commits (0 fixes) modifying crates/pgls\_configuration, packages/@postgrestools; 3 commits (3 fixes) fixing packages/@postgres-language-server, packages/@postgrestools; Workspace API introduces project scoping and new linting rules; New linter rules for safety, destructive changes, and correctness.
packages/@postgrestools/backend-jsonrpc/src · medium confidence · unverified
Introduce Pglinter configuration module
Added the \pglinter\ configuration module to define how the linter is enabled and which rules are active. This introduces a \PglinterConfiguration\ struct with an \enabled\ flag (defaulting to true) and a \rules\ configuration. The \rules\ module defines three rule groups—Base, Cluster, and Schema—and provides logic to determine which rules are enabled based on \recommended\ or \all\ presets, as well as to resolve the severity of specific rules by their category code.
_crates/pgls\configuration/src/pglinter · high confidence
Introduce Splinter database linting engine
The new Splinter engine enables database-level linting by executing embedded SQL queries against the connected database to detect issues such as missing indexes, security misconfigurations, and performance bottlenecks. It provides a structured diagnostic system that reports severity, affected database objects, and remediation guidance, while supporting rule filtering via an analysis filter and allowing users to ignore specific database objects through global and per-rule configuration patterns.
_crates/pgls\splinter/src · high confidence
Introduce Splinter linter configuration with global and per-rule ignore patterns
The Splinter linter module is now configurable via \SplinterConfiguration\, allowing users to enable or disable the feature globally and define a list of Unix-style glob patterns (e.g., \schema.object\_name\) to ignore database objects across all rules. Additionally, \SplinterRuleOptions\ enables fine-grained filtering by specifying ignore patterns per rule, giving users precise control over which database objects are analyzed by the linter.
_crates/pgls\configuration/src/splinter · high confidence
Introduce comprehensive code generation infrastructure for analyser, bindings, and configuration
The \xtask/codegen\ tool now provides a unified code generation system that automates the creation of analyser rule structures, TypeScript bindings for the Workspace API, and configuration files for linters, splinter, and pglinter. This infrastructure generates Rust modules for lint categories and groups, produces TypeScript interfaces and factory functions for JavaScript/TypeScript consumers, and creates configuration structs based on rule metadata. It also includes utilities for generating new lint rules and crates, streamlining the development and maintenance of the analysis and configuration layers.
xtask/codegen · high confidence
Introduce new CLI commands for database linting, schema export, and project initialization
The CLI now includes several new commands to manage and analyze your Postgres project. The \dblint\ command lints your database schema by pulling diagnostics from the workspace. The \schema\_export\ command connects to a PostgreSQL database and exports the schema cache as JSON, which is particularly useful for WASM bindings. Additionally, the \init\ command bootstraps a new project by creating a default \postgres-language-server.jsonc\ configuration file. These commands are integrated into the main CLI interface alongside existing commands like \check\, \format\, and \daemon\ management. Also in this area: Nested configuration support and rule filtering in check and format commands; Add automatic lint rule fixes via --fix and --unsafe flags; Support for formatting SQL via stdin and improved layout for comments and line breaks; New parse command to output SQL parse trees as protobuf. Also in this area: 3 commits (0 fixes) modifying crates/pgls\_cli, crates/pgls\_configuration.
_crates/pgls\cli/src/commands · medium confidence · unverified
Introduce new diagnostics crate with rich error reporting and database context
The \pgls\_diagnostics\ crate has been added to provide a structured, extensible system for reporting errors and warnings. It introduces a \Diagnostic\ trait that supports rich metadata including severity levels (error, warning, info, hint, fatal), fixable tags, and source code locations. The system allows wrapping standard errors (like \std::io::Error\ or \serde\_json::Error\) into typed diagnostics with specific categories. A key feature is the support for database object context (schema, table, function names) in diagnostic locations, enabling more precise error reporting for database-related issues. The crate also includes utilities for generating code frames, diffs, and command suggestions, as well as specialized display formatters for console output and GitHub Actions annotations. Also in this area: 1 commit (0 fixes) modifying crates/pgls\_analyse, crates/pgls\_diagnostics, crates/pgls\_workspace/src/features/code\_actions; GitHub Actions reporter now outputs diagnostics without file paths.
_crates/pgls\diagnostics/src · low confidence · unverified
Introduce new diagnostics display subsystem
The \pgls\_diagnostics\ crate now includes a new display module containing implementations for rendering backtraces, code frames, diffs, and diagnostic messages. This adds the capability to format and print detailed diagnostic information, including native stack traces, text diffs with context, and highlighted code frames, to users.
_crates/pgls\diagnostics/src/display · high confidence
Introduce pgls\_fs crate with unified file system abstraction
The new \pgls\_fs\ crate provides a unified file system abstraction for the Postgres Language Server, featuring a \FileSystem\ trait with implementations for both the operating system (\OsFileSystem\) and an in-memory store (\MemoryFileSystem\). This includes automatic configuration file discovery via \auto\_search\ (supporting \postgres-language-server.jsonc\ and the deprecated \postgrestools.jsonc\), a \PathInterner\ for efficient path deduplication, and a \PgLSPath\ type that tracks file priority (Config, Ignore, Inspectable, Handleable) and write status. The crate also exposes an \ignored\_path\ procedural macro to simplify workspace server logic by automatically returning default values when a path is ignored by user settings. Also in this area: Configurable file search with depth and entry limits. Also in this area: 2 commits (2 fixes) fixing crates/pgls\_cli.
_crates/pgls\fs · medium confidence · unverified
Introduce pgls\_suppressions crate for lint suppression handling
Added the new \pgls\_suppressions\ crate, which provides the core logic for parsing and applying lint suppressions in SQL files. This includes a parser that recognizes \-- pgt-ignore\ and \-- pgls-ignore\ comments (supporting file, line, and range-based scopes), a line-index utility for mapping text offsets to line numbers, and logic to detect unused or disabled suppressions. This change enables users to selectively disable specific lints via comments. Also in this area: Line suppressions now apply to entire statements. Also in this area: 1 commit (0 fixes) modifying crates/pgls\_statement\_splitter, crates/pgls\_suppressions; 1 commit (1 fix) fixing crates/pgls\_line\_index, crates/pgls\_suppressions.
_crates/pgls\suppressions · medium confidence · unverified
Introduce static diagnostic category registry with compile-time generation
The \pgls\_diagnostics\_categories\ crate now provides a centralized, static registry for all diagnostic categories used by the pg toolchain. A new build script generates Rust code from \src/categories.rs\, creating a compile-time registry that includes lint/safety rules, pglinter rules (base, cluster, schema), and splinter rules (performance, security), along with general categories like syntax and typecheck. This enables consistent categorization of diagnostics, automatic documentation link resolution, and macro-based lookup (\category!\, \category\_concat!\) for analyser rules, ensuring that all diagnostic codes are registered and validated at compile time. Also in this area: 11 commits (4 fixes) modifying crates/pgls\_analyser; New diagnostics for non-transactional statements and migration section markers; New linter rules for safety, destructive changes, and correctness.
_crates/pgls\_diagnostics\categories · medium confidence · unverified
Introduce syntax-aware SQL autocompletions
The \pgls\_completions\ crate now provides context-aware autocompletion for PostgreSQL statements. It uses the \tree-sitter\ incremental parser to analyze incomplete SQL at the cursor position and suggests items such as tables, columns, functions, schemas, policies, roles, and keywords. The system ranks these suggestions based on relevance and filters them according to the current SQL context (e.g., ignoring columns in a \FROM\ clause), ensuring that only appropriate completions are displayed in the editor. Also in this area: 3 commits (2 fixes) fixing (repo-wide).
_crates/pgls\_test\utils/src · medium confidence · unverified
Introduce the pgls\_statement\_splitter crate
The new \pgls\_statement\_splitter\ crate provides a \split\ function that breaks SQL source strings into individual statement ranges. It handles complex syntax including CTEs (with optional \MATERIALIZED\ hints), \EXPLAIN\ prefixes, and \ALTER\ statements, while preserving blank lines within statements unless they serve as recovery boundaries for unparseable fragments. The release includes a benchmark suite for performance validation and a comprehensive set of data-driven tests covering DDL, DML, and edge cases like blank lines and comments.
_crates/pgls\_statement\_splitter/src, crates/pgls\_statement\splitter/src/splitter · high confidence
Introduces OS-specific daemon transport layer for CLI-server communication
The CLI now manages a background server daemon using platform-specific transport mechanisms: Unix systems use a domain socket located in the global cache directory, while Windows uses a named pipe. The \pgls\_cli/src/service\ module implements the logic to spawn the daemon process, ensure it is running and ready to accept connections, and handle the asynchronous read/write channels for JSON-RPC messages. This change establishes the foundational communication layer between the CLI and the server, including timeout handling and pending request management.
_crates/pgls\cli/src/service · high confidence
Introduces a new JSON-RPC backend for connecting to the Postgres Language Server daemon
This change adds a new \backend-jsonrpc\ package that enables the language client to communicate with the Postgres Language Server via a remote daemon process. It includes platform-specific binary detection (supporting Windows, macOS, and Linux/glibc/musl), a socket-based transport layer implementing the JSON-RPC 2.0 protocol with HTTP-like headers, and a generated TypeScript workspace API. This allows users to leverage the daemon's advanced features, such as the new linting rules (pglinter, splinter) and formatting options, through a standardized remote interface. Also in this area: Workspace API introduces project scoping and new linting rules; New linter rules for safety, destructive changes, and correctness. Also in this area: 5 commits (0 fixes) modifying packages/@postgres-language-server; 3 commits (3 fixes) fixing packages/@postgres-language-server, packages/@postgrestools.
packages/@postgres-language-server/backend-jsonrpc · medium confidence · unverified
Introduction of Safety lint rules for database schema changes
The linter configuration now includes a new 'Safety' rule group designed to detect database schema modifications that can cause performance issues or lock contention. This group covers rules such as \add\_serial\_column\, \adding\_field\_with\_default\, \adding\_foreign\_key\_constraint\, \adding\_not\_null\_field\, \adding\_primary\_key\_constraint\, \adding\_required\_field\, \avoid\_adding\_exclusion\_constraint\, \avoid\_alter\_enum\_add\_value\, \avoid\_attaching\_partition\, \avoid\_create\_trigger\, \avoid\_enable\_disable\_trigger\, and \avoid\_wide\_lock\_window\. Users can enable these rules via the \recommended\ or \all\ flags in their configuration to receive warnings about potentially risky DDL operations. Also in this area: Configuration updates: inlay hints, semantic tokens, and formatting validation; New linter rules for safety, destructive changes, and correctness. Also in this area: 4 commits (3 fixes) fixing crates/pgls\_configuration; 4 commits (0 fixes) modifying crates/pgls\_configuration, packages/@postgrestools.
_crates/pgls\configuration/src/linter · medium confidence · unverified
LSP server initialization with sticky client configuration and position encoding support
The \pgls\_lsp\ server now supports negotiating LSP position encodings (UTF-8, UTF-16, UTF-32) to correctly map cursor positions and ranges for editors using different character encodings. Additionally, it introduces a sticky client configuration override layer that allows the editor to push runtime settings (such as database connection details or search paths) which take precedence over file-based and environment configurations for the current session, ensuring that live editor instructions are not silently overridden by static environment variables. Also in this area: Improved LSP robustness and nested workspace configuration support; Add inlay hints and autofix code actions for lint rules. Also in this area: 2 commits (0 fixes) modifying crates/pgls\_lsp, packages/@postgres-language-server, packages/@postgrestools; 4 commits (3 fixes) fixing crates/pgls\_lsp.
_crates/pgls\lsp/src · medium confidence · unverified
New @postgres-language-server/wasm package for browser and Node.js SQL tooling
The new \@postgres-language-server/wasm\ package exposes the Postgres Language Server as WebAssembly bindings, offering two distinct APIs for SQL development in the browser and Node.js. The \*\Workspace API\\* (\@postgres-language-server/wasm/workspace\) provides a direct, lightweight interface for parsing, linting, code completion, and hover information, making it suitable for custom editor integrations or build-time tooling. The \*\LanguageServer API\\* (\@postgres-language-server/wasm/lsp\) implements the full LSP JSON-RPC protocol, enabling integration with standard LSP clients like Monaco Editor via web workers. The package also includes TypeScript types for schema caching and comprehensive E2E tests to verify the integration. Also in this area: 5 commits (0 fixes) modifying packages/@postgres-language-server.
packages/@postgres-language-server/wasm/e2e · medium confidence · unverified
New CLI reporting formats and file-targeting options
The CLI now supports multiple output reporters via the \--reporter\ flag, including \json\, \json-pretty\, \summary\, \github\, \junit\, and \gitlab\, allowing diagnostics to be formatted for CI/CD integration or machine parsing. Additionally, the \check\ and \format\ commands now accept \--changed\ and \--since\ arguments to target only modified files relative to a base branch or specific commit, and a \--staged\ flag to process only git-staged files. Also in this area: Improved CLI diagnostics, nested configuration support, and worker stack stability; Add automatic lint rule fixes via --fix and --unsafe flags; Support for formatting SQL via stdin and improved layout for comments and line breaks; New parse command to output SQL parse trees as protobuf.
_crates/pgls\cli/src · high confidence
New PostgreSQL Language Server grammar crate for LSP autocompletion
The \pgls\_treesitter\_grammar\ crate has been introduced to provide a custom tree-sitter grammar for PostgreSQL, specifically designed to support Language Server Protocol features like autocompletion and hover information. The grammar uses specific identifier types (e.g., \column\_identifier\, \table\_reference\) and partial parsing rules to enable accurate suggestions while users are typing incomplete SQL statements. It includes an external C scanner for handling dollar-quoted strings, a Rust build script for generating the parser, and benchmarking tests to measure parsing performance. Also in this area: 3 commits (2 fixes) fixing crates/pgls\_treesitter\_grammar; Improved catalog accuracy for editor features and SQL semantics.
_crates/pgls\_treesitter\grammar · medium confidence · unverified
New Splinter lint rules for performance and security
The \pgls\_splinter\ crate now includes a generated set of lint rules organized into \performance\ and \security\ categories. The performance rules detect issues such as duplicate indexes, unindexed foreign keys, unused indexes, missing primary keys, table bloat, multiple permissive RLS policies, and inefficient RLS policy functions. The security rules flag exposed \auth.users\ data, extensions in the public schema, outdated extension versions, foreign keys to auth unique constraints, foreign tables accessible via API, functions with mutable search paths, insecure queues exposed in APIs, and materialized views accessible over APIs. These rules are automatically registered under the \Splinter\ lint category and can be configured via the \splinter.rules\ JSON configuration.
_crates/pgls\splinter/src/rules · high confidence
New derive macro for structured diagnostics
The \pgls\_diagnostics\_macros\ crate introduces a \\#\[derive(Diagnostic)\]\ macro that automatically implements the \Diagnostic\ trait for structs and enums. Users can now annotate types with attributes like \severity\, \category\, \description\, \message\, \advice\, \location\, and \tags\ to generate structured diagnostic output, supporting both static values and dynamic fields.
_crates/pgls\_diagnostics\macros · high confidence
New lint rules for destructive and safety-critical migrations
The \pgls\_analyser\ now includes a comprehensive set of new lint rules designed to prevent data loss and downtime during database migrations. In the 'destructive' category, rules such as \banDeleteWithoutWhere\, \banUpdateWithoutWhere\, \banDropTable\, \banDropColumn\, and \banTruncate\ flag operations that could accidentally remove or modify large amounts of data. The 'safety' category introduces checks for operations that cause full table rewrites or long-held locks, including \addSerialColumn\, \changingColumnType\, and \requireConcurrentIndexCreation\. Additionally, 'correctness' rules like \banConcurrentIndexCreationInTransaction\ and \transactionNesting\ help avoid common migration tooling pitfalls, while \invalidDropTypeSignature\ prevents syntax errors when dropping types with parameter lists. Also in this area: Improved diagnostic precision and new transaction safety checks; New lint rules and autofix support added to the analyser. Also in this area: 11 commits (4 fixes) modifying crates/pgls\_analyser; 8 commits (6 fixes) fixing crates/pgls\_analyser/src.
_crates/pgls\analyser/src · medium confidence · unverified
New lint rules for destructive and safety-critical migrations
The \pgls\_analyser\ now includes a comprehensive set of new lint rules designed to prevent data loss and downtime during database migrations. In the 'destructive' category, rules such as \banDeleteWithoutWhere\, \banUpdateWithoutWhere\, \banDropTable\, \banDropColumn\, and \banTruncate\ flag operations that could accidentally remove or modify large amounts of data. The 'safety' category introduces checks for operations that cause full table rewrites or long-held locks, including \addSerialColumn\, \changingColumnType\, and \requireConcurrentIndexCreation\. Additionally, 'correctness' rules like \banConcurrentIndexCreationInTransaction\ and \transactionNesting\ help avoid common migration tooling pitfalls, while \invalidDropTypeSignature\ prevents syntax errors when dropping types with parameter lists. Also in this area: Improved diagnostic precision and new transaction safety checks; New lint rules and autofix support added to the analyser. Also in this area: 9 commits (7 fixes) fixing crates/pgls\_analyser/src/lint/safety; 11 commits (4 fixes) modifying crates/pgls\_analyser.
_crates/pgls\analyser/src/lint/safety · medium confidence · unverified
New rules\_check tool for validating lint rule documentation
A new \rules\_check\ utility has been added to the \xtask\ suite. This tool scans the registered lint rules and validates their associated documentation code blocks, ensuring that each example produces the expected diagnostic output (or none) and fails if the analysis returns unexpected results. This helps maintain the accuracy and consistency of the linter's documentation.
_xtask/rules\check · high confidence
Typechecker now validates CREATE TABLE AS and view definitions
The typechecker in \crates/pgls\_typecheck\ now inspects the query bodies of \CREATE TABLE AS\, \CREATE VIEW\, and \CREATE MATERIALIZED VIEW\ statements. It extracts the inner \SELECT\ query, parses it, and runs the same type validation against the database schema as it does for direct queries. This ensures that invalid column references or type mismatches inside these definition statements are caught and reported as diagnostics, rather than being silently ignored. Also in this area: 3 commits (2 fixes) fixing (repo-wide); 11 commits (4 fixes) modifying crates/pgls\_analyser.
_crates/pgls\typecheck · medium confidence · unverified
WASM bindings for browser-based Postgres language server features
The \pgls\_wasm\ crate now provides WebAssembly bindings, enabling the Postgres language server to run in browser environments. This includes a build script (\build-wasm.sh\) and Nix flake for compiling the Rust code to WASM via Emscripten, exposing both a direct Workspace API (for parsing, linting, and completions) and a full LSP JSON-RPC handler for integration with editors like Monaco. Users can now leverage SQL analysis capabilities directly in the browser without a backend server. Also in this area: Support for formatting SQL via stdin and improved layout for comments and line breaks.
_crates/pgls\wasm · high confidence
Behavioural changes
10 commits (3 fixes) modifying crates/pgls\_lsp/src/adapters
A change to existing behaviour in crates/pgls\lsp/src/adapters — 10 commits (3 fixs), 3 files: “chore(lsp): migrate from tower-lsp to tower-lsp-server 0.23 (\#877)”; “refactor: rename crates to pgls\\* (\#581)”; “refactor(lsp): move the line index into a pgls\_line\_index crate (\#1063)”; and 7 more (refs \#877, \#581, \#1063, \#1109, \#546, …).
_crates/pgls\lsp/src/adapters · medium confidence · unverified
12 commits (4 fixes) modifying crates/pgls\_catalog/src/resolve/expr
A change to existing behaviour in crates/pgls\_catalog/src/resolve/expr — 12 commits (4 fixs), 20 files: “feat(catalog): keep editor features working after DO, CALL and unparsable statements; resolve CALL (\#914)”; “feat(linter): flat rule ids and static type checking (\#815)”; “fix(catalog): match the output arguments of functions in CALL (\#1023)”; and 9 more (refs \#914, \#815, \#1023, \#861, \#978, …).
_crates/pgls\catalog/src/resolve/expr · medium confidence · unverified
14 commits (6 fixes) modifying crates/pgls\_wasm/src
A change to existing behaviour in crates/pgls\_wasm/src — 14 commits (6 fixs), 4 files: “feat(linter): flat rule ids and static type checking (\#815)”; “feat: expose new workspace function splitStatements with ranges (\#730)”; “feat(wasm): add code actions to the WASM language server (\#962)”; and 11 more (refs \#815, \#730, \#962, \#969, \#1058, …).
_crates/pgls\wasm/src · medium confidence · unverified
14 commits (7 fixes) modifying crates/pgls\_plpgsql\_check
A change to existing behaviour in crates/pgls\_plpgsql\_check — 14 commits (7 fixs), 2 files: “fix(workspace): validate the spans of diagnostics from the database (\#1050)”; “fix(plpgsql): handle multibyte diagnostic offsets (\#737)”; “feat(linter): flat rule ids and static type checking (\#815)”; and 11 more (refs \#1050, \#737, \#815, \#581, \#862, …).
_crates/pgls\_plpgsql\check · medium confidence · unverified
16 commits (7 fixes) modifying crates/pgls\_treesitter/src/context
A change to existing behaviour in crates/pgls\_treesitter/src/context — 16 commits (7 fixs), 2 files: “fix(completions): multi-byte text before the cursor and aliases of quoted tables (\#966)”; “refactor: make node identification simpler by updating tree-sitter grammar”; “feat(completions): offer the columns each MERGE branch can see (\#1133)”; and 13 more (refs \#966, \#1133, \#1118, \#581, \#976, …).
_crates/pgls\treesitter/src/context · medium confidence · unverified
2 commits (0 fixes) modifying crates/pgls\_test\_utils/testdb\_migrations
A change to existing behaviour in crates/pgls\_test\_utils/testdb\migrations — 2 commits, 1 file: “refactor: rename crates to pgls\\* (\#581)”; “chore(splinter): initial commit (\#594)” (refs \#581, \#594).
_crates/pgls\_test\_utils/testdb\migrations · medium confidence · unverified
3 commits (1 fix) modifying crates/pgls\_semantic\_tokens
A change to existing behaviour in crates/pgls\_semantic\_tokens — 3 commits (1 fix), 2 files: “feat(hover): hover the columns of MERGE and of SET values (\#1123)”; “feat(lsp): semantic tokens for roles and schemas named on their own (\#1054)”; “fix(lsp): split semantic tokens that span several lines into one token per line (\#1015)” (refs \#1123, \#1054, \#1015). Also in this area: 1 commit (0 fixes) modifying crates/pgls\_inlay\_hints, crates/pgls\_semantic\_tokens; Semantic highlighting for SQL names and types.
_crates/pgls\_semantic\tokens/src · medium confidence · unverified
3 commits (1 fix) modifying crates/pgls\_text\_edit
A change to existing behaviour in crates/pgls\_text\edit — 3 commits (1 fix), 1 file: “refactor: rename crates to pgls\\* (\#581)”; “fix(lsp): debug assertions at range boundaries, keep client positions on char boundaries (\#952)”; “refactor: warn on unwrap, expect and indexing in the editor-feature crates (\#1078)” (refs \#581, \#952, \#1078).
_crates/pgls\_text\edit · medium confidence · unverified
32 commits (13 fixes) modifying crates/pgls\_catalog/src/resolve/nodes
A change to existing behaviour in crates/pgls\catalog/src/resolve/nodes — 32 commits (13 fixs), 25 files: “fix(catalog): expand \ over joins with USING and NATURAL (\#1041)”; “feat(catalog): keep editor features working after DO, CALL and unparsable statements; resolve CALL (\#914)”; “feat(linter): flat rule ids and static type checking (\#815)”; and 29 more (refs \#1041, \#914, \#815, \#1149, \#904, …).
_crates/pgls\catalog/src/resolve/nodes · medium confidence · unverified
33 commits (11 fixes) modifying crates/pgls\_completions
A change to existing behaviour in crates/pgls\_completions — 33 commits (11 fixs), 59 files: “fix(completions): multi-byte text before the cursor and aliases of quoted tables (\#966)”; “refactor: make node identification simpler by updating tree-sitter grammar”; “feat(completions): offer the columns each MERGE branch can see (\#1133)”; and 30 more (refs \#966, \#1133, \#1118, \#599, \#815, …).
_crates/pgls\completions · medium confidence · unverified
4 commits (1 fix) modifying crates/pgls\_lexer\_codegen
A change to existing behaviour in crates/pgls\_lexer\codegen — 4 commits (1 fix), 6 files: “refactor: rename crates to pgls\\* (\#581)”; “chore: remove bundled editor integration (\#738)”; “chore(query): upgrade libpg\_query to 18.1.0 (\#1055)”; and 1 more (refs \#581, \#738, \#1055, \#837).
_crates/pgls\_lexer\codegen · medium confidence · unverified
6 commits (2 fixes) modifying crates/pgls\_catalog/src/typing/overload
A change to existing behaviour in crates/pgls\_catalog/src/typing/overload — 6 commits (2 fixs), 4 files: “feat(linter): flat rule ids and static type checking (\#815)”; “fix(catalog): match the output arguments of functions in CALL (\#1023)”; “feat(lsp): add inlay hints and resolve hover through the catalog (\#861)”; and 3 more (refs \#815, \#1023, \#861, \#1147, \#1146, …).
_crates/pgls\catalog/src/typing/overload · medium confidence · unverified
6 commits (2 fixes) modifying crates/pgls\_query
A change to existing behaviour in crates/pgls\query — 6 commits (2 fixs), 29 files: “refactor: rename crates to pgls\\* (\#581)”; “fix(query): compile libpg\_query from the submodule instead of a copy in OUT\_DIR (\#1106)”; “chore(query): upgrade libpg\_query to 18.1.0 (\#1055)”; and 3 more (refs \#581, \#1106, \#1055, \#638, \#831, …).
_crates/pgls\query · medium confidence · unverified
7 commits (3 fixes) modifying crates/pgls\_catalog/src/catalog
A change to existing behaviour in crates/pgls\_catalog/src/catalog — 7 commits (3 fixs), 9 files: “fix(catalog): follow the indexes that constraints rename and drop, and partition indexes (\#1040)”; “feat(catalog): report non-DEFAULT values for GENERATED ALWAYS identity columns (\#1126)”; “fix(analyser): don't report a table rewrite when changing the type of a virtual generated column (\#1116)”; and 4 more (refs \#1040, \#1126, \#1116, \#1110, \#1054, …). Also in this area: 1 commit (0 fixes) modifying crates/pgls\_catalog; 11 commits (8 fixes) fixing crates/pgls\_catalog; Improved catalog accuracy for editor features and SQL semantics; New catalog snapshot loader and DDL execution engine.
(repo-wide) · low confidence · unverified
7 commits (3 fixes) modifying crates/pgls\_cli/src/reporter
A change to existing behaviour in crates/pgls\cli/src/reporter — 7 commits (3 fixs), 7 files: “feat(cli): implement json, json-pretty, and summary reporters (\#695)”; “refactor: rename crates to pgls\\* (\#581)”; “fix(cli): fail check on database login errors and read \~/.pgpass (\#839)”; and 4 more (refs \#695, \#581, \#839, \#968, \#979, …).
_crates/pgls\cli/src/reporter · medium confidence · unverified
8 commits (1 fix) modifying crates/pgls\_treesitter/src/queries
A change to existing behaviour in crates/pgls\treesitter/src/queries — 8 commits (1 fix), 9 files: “refactor: make node identification simpler by updating tree-sitter grammar”; “refactor: rename crates to pgls\\* (\#581)”; “chore: initial pretty printer (\#546)”; and 5 more (refs \#581, \#546, \#1120, \#1135, \#1130, …).
_crates/pgls\treesitter/src/queries · medium confidence · unverified
8 commits (4 fixes) modifying crates/pgls\_lexer
A change to existing behaviour in crates/pgls\lexer — 8 commits (4 fixs), 9 files: “refactor: rename crates to pgls\\* (\#581)”; “fix: handle named parameters in identifier contexts (\#790)”; “chore: initial pretty printer (\#546)”; and 5 more (refs \#581, \#790, \#546, \#981, \#788, …).
_crates/pgls\lexer · medium confidence · unverified
Added Tree-sitter helper utilities for syntax-aware completions
The \pgls\_treesitter\ crate now exposes helper functions (\goto\_node\_at\_position\, \goto\_previous\_leaf\, \goto\_closest\_unfinished\_parent\_clause\, \previous\_sibling\_completed\) and a list of single-token rules. These utilities enable the language server to navigate the syntax tree and determine clause completion status, which is required for providing syntax-aware completions for SELECT statements.
_crates/pgls\treesitter/src · medium confidence
Build-time download of Splinter linting rules
The build process now automatically downloads the latest Supabase Splinter SQL linting rules from the GitHub repository during compilation. A new build script checks for the presence of local vendor files and compares their commit SHA against the expected version; if the files are missing or outdated, it fetches the relevant SQL rule files via the GitHub API and stores them locally. This ensures that the tool always uses the correct, up-to-date set of linting rules without requiring manual updates to the repository's vendored content.
_crates/pgls\splinter · high confidence
CLI now delegates to platform-specific prebuilt binaries
The Postgres Language Server CLI has been updated to automatically detect the user's operating system (Windows, macOS, Linux/glibc, Linux/musl) and CPU architecture, then execute the corresponding prebuilt binary from the appropriate sub-package (e.g., cli-x86\_64-windows-msvc). This replaces any previous inline or generic execution logic, ensuring the CLI uses optimized native binaries for the detected environment. If no prebuilt binary is available for the detected platform, the CLI now exits with a clear error message directing users to file an issue.
packages/@postgres-language-server/cli/bin · high confidence
Improved identifier normalization and hover resolution for CALL statements
The hover feature now normalizes identifiers consistently, ensuring unquoted names are downcased and quoted names preserve their case, which fixes hover lookups for mixed-case or escaped identifiers. It also adds support for resolving \CALL\ statements (including procedures with output parameters) by falling back to function resolution when the grammar does not classify the statement, and prevents false-positive column hovers on qualifiers in qualified names like \u.name\. Also in this area: Hover and inlay hints now use catalog resolution for precise context; Added integration tests for hover functionality. Also in this area: 3 commits adding/updating tests in (repo-wide); 3 commits (0 fixes) modifying crates/pgls\_hover.
_crates/pgls\_hover/tests, crates/pgls\hover/tests/snapshots · medium confidence
Improved inlay hint accuracy for non-ASCII identifiers and procedure calls
The inlay hints feature now correctly handles PostgreSQL's identifier rules by using ASCII-only case folding for unquoted identifiers, ensuring that non-ASCII characters (like 'Ö' vs 'ö') are treated distinctly as they are in the database. Additionally, inlay hints are now generated for procedure calls that include output parameters, and the system filters out hints for calls where only positional arguments are used for named parameters, reducing noise in the editor. Also in this area: 3 commits adding/updating tests in (repo-wide); 1 commit adding/updating tests in crates/pgls\_inlay\_hints; Hover and inlay hints now use catalog resolution for precise context.
_crates/pgls\_inlay\_hints/src, crates/pgls\_inlay\hints/tests · medium confidence · unverified
Introduce context-aware hover prioritization for database objects
The hover feature now uses a scoring system to rank and filter results based on the SQL context, ensuring the most relevant table, column, function, role, schema, or type appears first. This change introduces a \prioritize\_by\_context\ algorithm that scores candidates by relevance (e.g., matching the current table alias or schema) and filters out less relevant items if their score drops significantly below the top result. Users will see more precise hover information, with columns and tables from the currently referenced context prioritized over generic matches. Also in this area: Improved identifier normalization and hover resolution for CALL statements; Hover and inlay hints now use catalog resolution for precise context. Also in this area: 3 commits (0 fixes) modifying crates/pgls\_hover.
_crates/pgls\_hover/src, crates/pgls\hover/src/hoverables · medium confidence · unverified
Introduce dedicated CLI execution engine for check and format modes
The CLI now uses a new execution module in \crates/pgls\_cli/src/execute\ to handle file processing, replacing previous ad-hoc logic. This module introduces \ExecutionConfig\ and \ExecutionMode\ to explicitly distinguish between \check\ (read-only linting) and \format\ (code modification) operations. It implements a file traversal system (\walk.rs\) that processes files via \process\_file\, routing them to specific \check\_file\ or \format\_file\ handlers. The \format\_file\ handler now supports writing changes to disk when \allows\_writes\ is true, or generating diffs for display otherwise, while \check\_file\ focuses on pulling and reporting diagnostics. A new \WorkspaceFile\ wrapper manages file I/O and workspace guards, and \diagnostics.rs\ provides extension traits for consistent error handling and reporting. Also in this area: CLI now supports rule filtering and stdin check with fixes; Add automatic lint rule fixes via --fix and --unsafe flags; Support for formatting SQL via stdin and improved layout for comments and line breaks.
_crates/pgls\_cli/src/execute/process\file · high confidence
Introduce structured configuration for database connections and credential redaction
The \pgls\_configuration\ crate now defines a dedicated \DatabaseConfiguration\ struct that manages connection parameters (host, port, username, password, database) and supports standard Postgres environment variables (\DATABASE\_URL\, \PGHOST\, \PGPORT\, \PGUSER\, \PGPASSWORD\, \PGDATABASE\) via a new \from\_env\ method. To prevent accidental exposure of sensitive data, the \Debug\ implementations for both \DatabaseConfiguration\ and \PartialDatabaseConfiguration\ now redact the \password\ and \connection\_string\ fields, replacing their values with \\[redacted\]\ in log output. Also in this area: Configuration updates: inlay hints, semantic tokens, and formatting validation. Also in this area: 4 commits (0 fixes) modifying crates/pgls\_configuration, packages/@postgrestools; 4 commits (3 fixes) fixing crates/pgls\_configuration.
_crates/pgls\configuration/src · medium confidence · unverified
New rule categorization and filtering system for the analyzer
The \pgls\_analyse\ crate now introduces a structured system for classifying and filtering lint rules. Rules are categorized into Lint, Action, or Transformation types, and code actions are mapped to LSP-standard categories (QuickFix, Refactor, Source) with specific sub-kinds like Extract or Inline. This change adds a filtering mechanism (\AnalysisFilter\) that allows users to enable or disable specific rules or entire groups by name, and to restrict analysis to specific categories. The system also includes a metadata registry to track rule information and sources (such as pgfence, Squawk, or Eugene). Also in this area: 1 commit (0 fixes) modifying crates/pgls\_analyse, crates/pgls\_diagnostics, crates/pgls\_workspace/src/features/code\_actions; Add automatic lint rule fixes via --fix and --unsafe flags.
_crates/pgls\analyse · low confidence · unverified
PostgresTools CLI now supports Linux musl builds
The PostgresTools CLI package now detects and supports Linux environments using the musl libc (such as Alpine Linux) in addition to the existing glibc support. The entry-point script automatically identifies the libc type at runtime and routes to the appropriate prebuilt binary, ensuring the tool works correctly on musl-based systems where it previously failed or was unavailable.
packages/@postgrestools/postgrestools · high confidence
Support for standard PostgreSQL environment variables
The environment configuration module now recognizes standard PostgreSQL connection variables (PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE) alongside the existing DATABASE\_URL, allowing users to connect to the database using common conventions. Additionally, the module exposes these variables for display, masking sensitive values like passwords while showing the status of all connection parameters. Also in this area: Clarify PGLS\_CONFIG\_PATH usage for different commands.
_crates/pgls\env · high confidence
Unified rule configuration and selector system across all analyzers
The configuration module has been refactored to introduce a generic \RuleConfiguration\ and \RuleSelector\ system that unifies how rules are defined and selected across the Linter, Splinter, and PgLinter analyzers. Users can now configure rule severity (Warn, Error, Info, Off) and options using a consistent structure, where overriding a rule's severity no longer discards its specific options. Additionally, rule selection is standardized via a \RuleSelector\ enum that parses prefixes like \lint/\, \splinter/\, and \pglinter/\, allowing users to target specific rules or entire groups from any analyzer using a uniform syntax.
_crates/pgls\configuration/src/rules · high confidence
Updated Splinter linter vendor with new performance and security checks
The Splinter vendor in this location has been updated to a newer commit (b9de3a3), introducing a suite of new database linter rules. Performance checks now detect unindexed foreign keys, duplicate or unused indexes, tables lacking primary keys, excessive table bloat, inefficient RLS policy evaluation patterns, and multiple permissive policies on the same role/action. Security checks now flag exposed auth users via views, extensions installed in the public schema, outdated extension versions, foreign keys referencing auth unique constraints, foreign tables accessible over APIs, functions with mutable search paths, insecure queues exposed in APIs, materialized views accessible over APIs, RLS policies existing without RLS enabled, RLS disabled on public tables, RLS enabled without policies, overly permissive RLS policies (e.g., USING true), and insecure references to user metadata in RLS policies.
_crates/pgls\splinter/vendor · high confidence
Workspace API refactored into client/server architecture with pull-based diagnostics
The workspace module has been restructured to separate the client and server concerns. A new \WorkspaceClient\ now handles outgoing JSON-RPC requests (such as \pgls/code\_actions\, \pgls/pull\_diagnostics\, and \pgls/invalidate\_schema\_cache\) to a \WorkspaceTransport\, enabling the workspace logic to be used in remote or WASM contexts. The \WorkspaceServer\ implements the \Workspace\ trait to process these requests locally, managing documents, schema caches, and settings. A key behavioral change is the introduction of 'pull-based' diagnostics: instead of pushing diagnostics automatically, the server now exposes \pull\_file\_diagnostics\ and \pull\_db\_diagnostics\ methods that clients must explicitly call to retrieve results. This change also includes fixes for handling unreachable database diagnostics and multiline suppression ranges. Also in this area: Workspace settings, connection isolation, and migration parsing improvements; Add inlay hints and autofix code actions for lint rules; Support for formatting SQL via stdin and improved layout for comments and line breaks. Also in this area: 5 commits (1 fix) modifying crates/pgls\_workspace; 9 commits (0 fixes) modifying crates/pgls\_workspace; 7 commits (4 fixes) fixing crates/pgls\_workspace; Introduce workspace server with database connection pooling and schema caching; Workspace configuration and file-matching subsystem introduced.
_crates/pgls\workspace · medium confidence · unverified
Fixes
11 commits (8 fixes) fixing crates/pgls\_catalog
A fix in crates/pgls\_catalog — 11 commits (8 fixs), 43 files: “fix(analyser): take lock levels from a port of AlterTableGetLockLevel (\#1155)”; “fix(catalog): recognise serial columns like Postgres does (\#1154)”; “fix(analyser): answer volatility, versions and type changes from the catalog (\#1156)”; and 8 more (refs \#1155, \#1154, \#1156, \#1019, \#1027, …). Also in this area: 11 commits (4 fixes) modifying crates/pgls\_analyser; Improved diagnostic precision and new transaction safety checks.
_crates/pgls\_query\ext · medium confidence · unverified
11 commits (8 fixes) fixing crates/pgls\_catalog
A fix in crates/pgls\_catalog — 11 commits (8 fixs), 43 files: “fix(analyser): take lock levels from a port of AlterTableGetLockLevel (\#1155)”; “fix(catalog): recognise serial columns like Postgres does (\#1154)”; “fix(analyser): answer volatility, versions and type changes from the catalog (\#1156)”; and 8 more (refs \#1155, \#1154, \#1156, \#1019, \#1027, …). Also in this area: 8 commits (2 fixes) modifying crates/pgls\_catalog; 2 commits (1 fix) modifying crates/pgls\_catalog/src/session; Improved catalog accuracy for editor features and SQL semantics; New catalog snapshot loader and DDL execution engine.
_crates/pgls\_analyser/src/lint/destructive, crates/pgls\_catalog/src/session, crates/pgls\catalog/src/typing · medium confidence · unverified
7 commits (5 fixes) fixing crates/pgls\_line\_index
A fix in crates/pgls\_line\_index — 7 commits (5 fixs), 5 files: “refactor(lsp): move the line index into a pgls\_line\_index crate (\#1063)”; “refactor(line\_index): one conversion of the character positions Postgres reports (\#1107)”; “fix(suppressions): end lines at \\n only, with the shared line index (\#1072)”; and 4 more (refs \#1063, \#1107, \#1072, \#1070, \#1125, …).
_crates/pgls\_line\index · medium confidence · unverified
8 commits (5 fixes) fixing crates/pgls\_pretty\_print/src/nodes/utils
A fix in crates/pgls\_pretty\_print/src/nodes/utils — 8 commits (5 fixs), 6 files: “fix(pretty\_print): keep a comment written before a list comma before the comma (\#1030)”; “fix(pretty\_print): write the commas of every node list with emit\_list\_comma (\#1045)”; “refactor(pretty\_print): remove GroupKind, pass the emitter first, enums instead of bool flags (\#996)”; and 5 more (refs \#1030, \#1045, \#996, \#999, \#1031, …).
_crates/pgls\_pretty\print/src/nodes/utils · medium confidence · unverified
Fixes to SQL pretty-printing: comments, long identifiers, and layout
The pretty-printer now preserves comments before keywords like CASE, GRANT, and TO by attaching them to the correct node, and keeps long identifiers (over 63 characters) in their original source form rather than truncating them. Layout improvements include keeping \= (\ together for scalar subqueries, aligning expanded CASE expressions from their start, indenting nested CASE branches from their THEN/ELSE lines, and breaking function calls (including JSON functions and aggregates) sensibly so that \count(\*)\ and similar constructs stay grouped. Additional fixes ensure comments before CASE and GRANT keywords remain in place, compact SELECT items close correctly, subqueries under WHERE/ON are closed under the keyword, VALUES keeps comments and headers together, and \WITH ADMIN OPTION\ is emitted portably. Also in this area: Align CASE branches in expanded layout; Support for formatting SQL via stdin and improved layout for comments and line breaks; Fix indentation of COALESCE and GREATEST/LEAST arguments; Added multi-file SQL snapshot tests for the pretty printer.
_crates/pgls\_pretty\_print/tests, crates/pgls\_pretty\print/tests/snapshots/multi · high confidence
Improved catalog accuracy for editor features and SQL semantics
The catalog now supports a 'best-effort' mode for editor features like hover and semantic tokens, allowing lookups to succeed even after statements the catalog cannot model (such as \DO\ or \CALL\). It also fixes \CALL\ resolution for procedures with output parameters, correctly names columns of scalar subqueries and field selections to match Postgres, and normalizes identifier case folding to be ASCII-only. Additionally, the resolver now records references for type casts, SQL function parameters, and string literals coerced to enum types, and expands \\*\ in select lists into individual column references. Also in this area: 1 commit (0 fixes) modifying crates/pgls\_catalog; 8 commits (2 fixes) modifying crates/pgls\_catalog; 11 commits (8 fixes) fixing crates/pgls\_catalog; New lint rules and autofix support added to the analyser; New catalog snapshot loader and DDL execution engine.
_crates/pgls\catalog/src/resolve · medium confidence · unverified
Improved diagnostic precision and new transaction safety checks
The analyser now provides more accurate error locations by pinpointing specific keywords (such as \DROP CONSTRAINT\ or \DROP DEFAULT\) rather than flagging entire statements, and it preserves comments when applying fixes. It also introduces a new rule that detects statements Postgres cannot run inside a transaction block (like \VACUUM\ or \CREATE INDEX CONCURRENTLY\) and offers safe, context-aware autofixes to add \CONCURRENTLY\ where appropriate. Additionally, the \banDuplicateColumnAssignments\ rule has been expanded to cover more scenarios, including \COPY\ statements and \ALTER TABLE\ commands. Also in this area: New lint rules and autofix support added to the analyser; Added regression and rule-specific tests for the pgls\_analyser. Also in this area: 11 commits (4 fixes) modifying crates/pgls\_analyser; 7 commits (5 fixes) fixing crates/pgls\_analyser/src/lint/correctness.
(repo-wide) · medium confidence
Test coverage
10 commits adding/updating tests in crates/pgls\_analyser/tests/specs; 20 commits adding/updating tests in crates/pgls\_cli/tests/snapshots; 3 commits adding/updating tests in (repo-wide); 3 commits adding/updating tests in (repo-wide); 9 commits adding/updating tests in crates/pgls\_analyser/tests/specs/correctness/banUncommittedTransaction; Added CLI integration tests for the PostgreSQL language server; Added PostgreSQL 15 regression test fixtures; Added benchmark suite for the SQL statement splitter; Added diagnostics tests for Splinter rules; Added multi-file SQL fixtures for pretty-printer testing; Added single-statement test fixtures for the pretty printer; Added snapshot tests for single SQL statement formatting; Added test coverage for SQL statement splitting edge cases; Added tests for CLI configuration, formatting, and Supabase initialization; Added tests for Postgres Language Server WASM bindings; Added tests for the JSON-RPC transport layer and workspace diagnostics; Test coverage for nested configuration file application.
Dependencies
Initial dependency manifest and lockfile setup
The project now includes a Cargo.lock file and updated Cargo.toml manifests for the workspace and its constituent crates (such as pgls\_cli, pgls\_lsp, and pgls\_treesitter\_grammar). This establishes the resolved dependency graph, including specific versions for core libraries like tree-sitter, tokio, and sqlx, ensuring reproducible builds for the Postgres Language Server.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 53 → 49 (-3.4)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 57 → 42 (-14.9)
- Architecture 94 → 96 (+2.7)
- Maturity 59 → 63 (+4.2)
- Readiness 66 → 73 (+6.5)
- Security 40 → 38 (-1.7)
- Domain Modelling 100 → 100 (+0.0)
- Performance 85 → 85 (+0.0)
Resolved (232)
- Analyser::analyse (cognitive 70) (crates/pgls_analyser/src/lib.rs)
- Analyser::analyse (cyclomatic 30) (crates/pgls_analyser/src/lib.rs)
- Change coupling: columns.rs ↔ sanitization.rs (crates/pgls_completions/src/providers/columns.rs)
- Change-coupling hub: server.rs → mod.rs, database.rs, text_document.rs, client.rs (crates/pgls_workspace/src/workspace/server.rs)
- ClassTooLong: WorkspaceServer (crates/pgls_workspace/src/workspace/server.rs)
- Duplicated block (10 lines × 2) (crates/pgls_analyser/src/lint/correctness/ban_duplicate_column_assignments.rs)
- Duplicated block (10 lines × 2) (crates/pgls_analyser/src/lint/safety/add_serial_column.rs)
- Duplicated block (10 lines × 2) (crates/pgls_catalog/src/catalog/overlay.rs)
- Duplicated block (10 lines × 2) (crates/pgls_catalog/src/resolve/mod.rs)
- Duplicated block (10 lines × 2) (crates/pgls_catalog/src/resolve/nodes/delete_stmt.rs)
- Duplicated block (10 lines × 2) (crates/pgls_diagnostics/src/display/frame.rs)
- Duplicated block (10 lines × 2) (crates/pgls_pretty_print/src/nodes/delete_stmt.rs)
- Duplicated block (10 lines × 2) (crates/pgls_pretty_print/src/nodes/json_func_expr.rs)
- Duplicated block (10 lines × 2) (crates/pgls_pretty_print/src/nodes/range_table_sample.rs)
- Duplicated block (10 lines × 2) (crates/pgls_pretty_print/src/nodes/window_clause.rs)
- Duplicated block (10 lines × 3) (crates/pgls_pretty_print/src/nodes/alter_domain_stmt.rs)
- Duplicated block (10 lines × 3) (crates/pgls_pretty_print/src/nodes/alter_owner_stmt.rs)
- Duplicated block (10 lines × 3) (crates/pgls_pretty_print/src/nodes/json_array_constructor.rs)
- Duplicated block (10 lines × 4) (crates/pgls_pretty_print/src/nodes/alter_object_schema_stmt.rs)
- Duplicated block (10 lines × 4) (crates/pgls_pretty_print/src/nodes/create_extension_stmt.rs)
- …and 212 more
New (373)
- Analyser::analyse_until (cognitive 18) (crates/pgls_analyser/src/lib.rs)
- Analyser::analyse_until (cyclomatic 16) (crates/pgls_analyser/src/lib.rs)
- Catalog::drop_column_indexes (cognitive 24) (crates/pgls_catalog/src/catalog/overlay.rs)
- Catalog::move_relation (cognitive 18) (crates/pgls_catalog/src/catalog/overlay.rs)
- Change coupling: columns.rs ↔ grammar.js (crates/pgls_completions/src/providers/columns.rs)
- Change coupling: document.rs ↔ tree.rs (crates/pgls_workspace/src/workspace/server/document.rs)
- Change coupling: mod.rs ↔ hovered_node.rs (crates/pgls_catalog/src/snapshot/mod.rs)
- Change-coupling hub: server.rs → mod.rs, database.rs, lib.rs, text_document.rs, lib.rs, client.rs, parse.rs, tree.rs (crates/pgls_workspace/src/workspace/server.rs)
- Duplicated block (10 lines × 2) (crates/pgls_catalog/src/catalog/overlay.rs)
- Duplicated block (10 lines × 2) (crates/pgls_diagnostics/src/display/frame.rs)
- Duplicated block (10 lines × 2) (crates/pgls_pretty_print/src/nodes/alter_type_stmt.rs)
- Duplicated block (10 lines × 2) (crates/pgls_pretty_print/src/nodes/clauses/set_clause.rs)
- Duplicated block (10 lines × 2) (crates/pgls_pretty_print/src/nodes/create_publication_stmt.rs)
- Duplicated block (10 lines × 2) (crates/pgls_pretty_print/src/nodes/type_name.rs)
- Duplicated block (10 lines × 3) (crates/pgls_pretty_print/src/nodes/alter_domain_stmt.rs)
- Duplicated block (10–11 lines × 2) (crates/pgls_pretty_print/src/nodes/range_function.rs)
- Duplicated block (11 lines × 2) (crates/pgls_configuration_macros/src/partial_derive/attrs.rs)
- Duplicated block (11 lines × 2) (crates/pgls_diagnostics_macros/src/generate.rs)
- Duplicated block (11 lines × 2) (crates/pgls_pretty_print/src/nodes/alter_domain_stmt.rs)
- Duplicated block (11 lines × 2) (crates/pgls_pretty_print/src/nodes/clauses/options.rs)
- …and 353 more
Changes since last survey
- 149 commits — 78 feature/other, 71 fixes
By area
- crates/pgls_analyser — 33 commits
- crates/pgls_catalog — 27 commits
- crates/pgls_workspace — 24 commits
- crates/pgls_pretty_print — 15 commits
- crates/pgls_completions — 9 commits
- crates/pgls_cli — 8 commits
- crates/pgls_lsp — 6 commits
- (root) — 4 commits
- crates/pgls_hover — 4 commits
- crates/pgls_line_index — 3 commits
- crates/pgls_diagnostics — 2 commits
- crates/pgls_fs — 2 commits
- crates/pgls_migrations — 2 commits
- crates/pgls_query — 2 commits
- crates/pgls_treesitter_grammar — 2 commits
- .github/workflows — 1 commit
- crates/pgls_query_ext — 1 commit
- crates/pgls_semantic_tokens — 1 commit
- crates/pgls_statement_splitter — 1 commit
- crates/pgls_suppressions — 1 commit
Notable commits
- fix: chore: fix just test, add just check, setup and lint-actions (#1043)
- fix: fix(analyser): a few rule edge cases found while sharing their helpers (#1158)
- fix: fix(analyser): add a semicolon before the COMMIT of banUncommittedTransaction when the last statement has none (#1062)
- fix: fix(analyser): answer volatility, versions and type changes from the catalog (#1156)
- fix: fix(analyser): check fixes of statements with placeholders with parameters (#1037)
- fix: fix(analyser): check fixes that edit after their statement on the file (#1044)
- fix: fix(analyser): don't report a table rewrite for virtual generated columns (#1111)
- fix: fix(analyser): don't report a table rewrite when changing the type of a virtual generated column (#1116)
- fix: fix(analyser): don't report generated, identity and serial columns as required (#1115)
- fix: fix(analyser): don't report locking problems on tables created in the same transaction (#1157)
- fix: fix(analyser): don't suggest USING INDEX for temporal keys (#1114)
- fix: fix(analyser): handle NOT ENFORCED foreign keys and ALTER CONSTRAINT ... ENFORCED (#1112)
- fix: fix(analyser): lint rule edge cases (#970)
- fix: fix(analyser): move the spans of diagnostic details into the file (#1049)
- fix: fix(analyser): one model of transaction blocks for the transaction rules (#1153)
- fix: fix(analyser): point at the duplicate name of view and COPY column lists (#1047)
- fix: fix(analyser): report REINDEX INDEX on a partitioned index in a transaction (#1020)
- fix: fix(analyser): skip CREATE TABLE AS IF NOT EXISTS of a relation that may exist in banDuplicateColumnAssignments (#1079)
- fix: fix(analyser): take lock levels from a port of AlterTableGetLockLevel (#1155)
- fix: fix(catalog): add the columns of SEARCH and CYCLE to a CTE (#1019)
- …and 129 more
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
supabase-community/postgres-language-server was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 645f3a120f143db43554716562e71d08400138e3 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-e1a3b69fc8ee.