feat(postgres): add configurable pgvector extension support
Add pgvector data types (VECTOR, HALFVEC, SPARSEVEC) to the PostgreSQL
dialect, gated behind a `pgvector` config option following the same
pattern as pg_trgm. This fixes parsing of VECTOR(N) as a proper data
type with bracketed arguments, resolving the indentation bug in
CREATE TABLE statements.
Closes #2070
https://claude.ai/code/session_01KggBN5yWDsbETvCCYbuAWS
fix: prevent false positive LT01 violations when templater fails (#2354)
When the dbt/jinja templater fails (e.g., no dbt project found), the
linter was falling back to parsing the raw source SQL including template
syntax like `{{ ref('stg_users') }}`. This caused false positive LT01
spacing violations on the `{` `{` and `}` `}` tokens.
The fix:
- Add error message support to SQLTemplaterError and conversion to
SQLBaseError so templater errors are properly reported to users
- When a templater fails in render_files_batch or render_file, record
the error as a templater violation instead of silently dropping it
- In parse_rendered, handle templater violations by skipping parsing
(replacing the previous `unimplemented!()`) and returning the
templater error as the only violation
https://claude.ai/code/session_017A437S6ht899r5e3XPuJkB
fix: use multi-rule fixture for LT05 comment merge test
The bug is a multi-rule interaction: LT05 moves the trailing comment
correctly, but LT01 then removes the newline between the comment and
code. A single-rule LT05 fixture wouldn't catch the regression.
Create LT01_LT05.yml (following the CP01_CP03.yml convention) with
rule: LT01,LT05 so both rules run together, and revert the incorrectly
added single-rule fixture from LT05.yml.
Closes #2352
https://claude.ai/code/session_01Qq93DUgnKjmts5N1tdVX1s
feat: gate pg_trgm trigram operator parsing behind dialect setting
Add a `pg_trgm` configuration option to the PostgreSQL dialect that
enables parsing of trigram operators (%, <%, %>, <->, etc.) from the
pg_trgm extension. The setting defaults to false to avoid conflicts
with standard SQL parsing.
Configuration example:
[sqruff:dialect:postgres]
pg_trgm = true
- Replace NullDialectConfig with PostgresDialectConfig struct
- Add trgm_operator regex matcher gated behind the pg_trgm setting
- Add config-aware test infrastructure for dialect extensions
- Update dialect docs template and regenerate docs
https://claude.ai/code/session_017R4gsFdPF9Bw65vFiPzDUh