Skip to content

chore!: remove deprecated names and the EXPLAIN-based type check - #860

Draft
psteinroe wants to merge 5 commits into
mainfrom
chore/remove-deprecated-names
Draft

psteinroe wants to merge 5 commits into
mainfrom
chore/remove-deprecated-names

Conversation

@psteinroe

Copy link
Copy Markdown
Collaborator

Remove everything that earlier releases kept working with deprecation warnings, for the next breaking release. Held as a draft until that release is scheduled. The upgrade guide is docs/guides/upgrading_to_0_29.md; the version in its name is a placeholder.

PostgresTools names

The postgrestools binary, the @postgrestools/* npm packages and their release and publish steps are gone. Also removed: the postgrestools.jsonc config file name, the PGT_* environment variables and the pgt-ignore* suppression comments. The release build now sets PGLS_VERSION. The VS Code extension ID Supabase.postgrestools is unchanged, since it lives outside this repo.

Former rule IDs

These are no longer accepted:

  • the nested linter.rules.safety.<rule> config, plus safety.recommended / safety.all
  • lint/<group>/<rule> and lint/<group> in suppressions and --only/--skip
  • the removed rule names preferBigintOverInt, preferBigintOverSmallint and concurrentRefreshMatviewLock

safety now selects only the safety group, not every lint rule.

Schema cache is now snapshot

This is a hard rename with no aliases:

Before After
pgls.invalidateSchemaCache (LSP command) pgls.invalidateSnapshot
pgls/invalidate_schema_cache (workspace method) pgls/invalidate_snapshot
WASM type SchemaCache / schema-cache.d.ts Snapshot / snapshot.d.ts

The VS Code extension must switch to the new command name when this ships.

EXPLAIN-based type check

The pgls_typecheck crate is removed; the static typecheck rules cover it. database_diagnostics now only runs plpgsql_check. typecheck.enabled and typecheck.searchPath stay, because the rules use them.

Fixes #832

@psteinroe
psteinroe force-pushed the chore/remove-deprecated-names branch from ce1315a to 53c3d8e Compare October 18, 2026 07:49
psteinroe added a commit that referenced this pull request Oct 18, 2026
…ging the whole body (#862)

With plpgsql_check installed, editing a PL/pgSQL function no longer
underlines the entire function body.

**Located compile errors**

Errors that stop the function from compiling, like a misspelled
`DECLARE`, a missing `END IF` or an unknown variable, come from
plpgsql_check without a statement. They only have the body and a
character position, so we fell back to the whole body. They now point at
the token at that position, or at the delimiter in `syntax error at or
near ";"`. Errors at end of input still span the body.

**Whole-body libpg_query error**

libpg_query's PL/pgSQL syntax error has no usable location: `cursorpos`
is always 0, and its "near line N" is the last parsed statement, not the
error. It is now dropped for every function that plpgsql_check actually
checked. It is still reported when plpgsql_check can't check the
function: no database, extension missing or disabled, the function fails
to create, or no trigger uses a trigger function.

`#860` (draft) also touches `database_diagnostics`; whichever merges
second needs a small rebase.

Refs #179
Remove the postgrestools binary, the @postgrestools/* npm packages and
their release steps, the postgrestools.jsonc config file name, the PGT_*
environment variables and the pgt-ignore suppression comments.
Remove linter.rules.safety.<rule>, safety.recommended and safety.all,
the lint/<group>/<rule> and lint/<group> specifiers in suppressions and
--only/--skip, safety and lint/safety meaning every lint rule, and the
removed rule names preferBigintOverInt, preferBigintOverSmallint and
concurrentRefreshMatviewLock, together with their deprecation warnings.
The LSP command `pgls.invalidateSchemaCache` is now `pgls.invalidateSnapshot`,
the workspace method `pgls/invalidate_schema_cache` is now
`pgls/invalidate_snapshot`, and the WASM package exports the `Snapshot` type
(from `snapshot.d.ts`) instead of `SchemaCache`.
The typecheck rules replace it. Remove the pgls_typecheck crate and the
per-statement analysis results that only served it. plpgsql_check keeps
running against the database as before.
@psteinroe
psteinroe force-pushed the chore/remove-deprecated-names branch from 53c3d8e to 3a2649f Compare October 18, 2026 18:24

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove deprecated names in the next major release

1 participant