All updates

SQL Studio Catches More Destructive Statements

With Allow changes on, SQL Studio now reads every statement you run before deciding whether to ask, and it holds your browser's Back and Forward buttons while you have staged changes.

Version 2.9.133ImprovementDatabases

What's changed

  • With Allow changes on, SQL Studio now checks every statement in what you run, not only how the text starts: a DROP, TRUNCATE, ALTER, GRANT or REVOKE asks first in any statement, including after a semicolon, inside a WITH query or run by EXPLAIN ANALYZE
  • A DELETE or UPDATE counts as having a WHERE only when it has one of its own, so a WHERE inside a string, a comment or a subquery no longer hides a statement that would change every row
  • A MERGE that updates or deletes rows now asks first too, and so does a statement nested too deeply for SQL Studio to read
  • The check is a safety net, not a guarantee: SQL Studio does not read the inside of functions or DO blocks, and anything it does not flag runs without asking. The banner above the editor lists exactly what is checked, and read-only mode still refuses every change
  • In Chrome and other browsers that support the Navigation API, the Back and Forward buttons now ask before leaving SQL Studio while you have staged changes, and hold you on the page with a note while a commit is running; before, they left without asking and dropped the staged changes. Other browsers behave as they did