The SQLite team has released version 3.52, addressing a critical database corruption issue related to WAL resets. The new version also expands the SQL engine by enhancing the ALTER TABLE command, which now allows adding or removing NOT NULL and CHECK constraints for greater schema flexibility.
Moreover, this release adds two built-in SQL functions, json_array_insert() and jsonb_array_insert(), which extend JSON functionality for inserting values into JSON or JSONB arrays.
The new Query Result Formatter library improves the display of query results on fixed-width terminals, as the CLI now uses QRF to render tables with Unicode box-drawing characters. Plus, numeric values are right-aligned by default for better clarity, and batch sessions retain the legacy output format to ensure script compatibility.
The CLI includes several enhancements. The .mode command has been significantly improved, and bare semicolons at the end of dot-commands are now ignored. The .timer command now supports a once argument to time only the next SQL statement.
The .progress command adds a --timeout option to interrupt queries after a set duration. Command-line arguments referencing .sql or .txt files are now automatically treated as scripts if they contain SQL statements or dot-commands.
The query planner has been improved for better performance, with SQLite now consistently using a sort-and-merge strategy for EXCEPT, INTERSECT, and UNION operations, which is generally faster than hash-based methods. Additional optimizations enhance join ordering in complex star-schema queries and improve EXISTS-to-JOIN transformations.
It’s also worth noting that floating-point-to-text conversions now round values to 17 significant digits by default, up from 15 in previous versions. Finally, SQLite 3.52 discontinues support for Windows RT.
For more details, see the release notes.
