Skip to content

fix(sql): the destructive-query detector covers the gaps listed in #1770 - #1786

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
fix/destructive-detector-gaps
Oct 25, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
fix/destructive-detector-gaps

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1770.

  • Identifiers are Unicode-aware ([\p{L}\p{N}_$]+), so DROP TABLE "заказы", DROP DATABASE склад and public.заказы are detected and named in full.
  • DELETE accepts LOW_PRIORITY, QUICK, IGNORE and the multi-table DELETE t1 FROM t1 JOIN ....
  • A leading EXPLAIN ANALYZE and a WITH ... (...) list are looked through before matching DELETE / UPDATE. A plain EXPLAIN still does not count.
  • New types: dropColumn (HIGH) for ALTER TABLE ... DROP COLUMN and dropOther (MEDIUM) for DROP INDEX / TYPE / FUNCTION / PROCEDURE / ROLE / USER and similar.

Not covered: a data-modifying CTE body (WITH d AS (DELETE ... RETURNING *) SELECT ...). Tests not run locally, CI will.

…L DELETE forms, WITH ... DELETE, EXPLAIN ANALYZE, DROP COLUMN and other DROPs (#1770)
@github-actions github-actions Bot added bug Something isn't working editor Code/SQL editor P2 Medium priority / Parity & Refactoring labels Oct 25, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 9d8dc40 into dev Oct 25, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working editor Code/SQL editor P2 Medium priority / Parity & Refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant