Repository navigation
Conversation
This was referenced Nov 7, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This gives applications a way to use SQLite's own math functions now, ahead of changing the default in the next major release. It also adds the missing native functions (
ln,log2,mod,trunc,pow,ceiling, and two-argumentlog) in both modes.Existing query results are preserved by default (
useOldExtensionFunctions: true). Calling a legacy function now prints a deprecation warning naming it and linking to #619. Initialization and ordinary SQL stay quiet. Warnings are not suppressed: a scalar function applied to every row can produce many messages, including for functions such assqrtwhose ordinary numeric results look unchanged.To try native behavior:
Consequences of opting in:
log(x)becomes base 10. Useln(x)to preserve natural-log calculations.sqrt('abc')andsign('abc')return NULL rather than zero, andsign(2.5)returns an integer rather than a real.stdev,variance,mode,median, the quartiles, and string helpers such asreverseandcharindex, are unavailable. Saved queries, views, or triggers using them will need changes too.sign()can be used in expression indexes and generated columns, allowing schemas affected by Bundled extension-functions.c replaces SQLite's built-in sign() #646 to work. This remains opt-in; the default keeps the old override.The first initialization chooses the mode for all databases from that module. For workers, set
config: { useOldExtensionFunctions: false }on the first message. Native mode is silent; applications can use it to find migration problems before the default changes.Related: #619, #646.