From 22d85213f2556fc806a639041afd6ea736ba1d61 Mon Sep 17 00:00:00 2001 From: Anton Date: Sun, 12 Dec 2021 15:26:46 +0300 Subject: [PATCH] doc: unicode extension does not work with load_extension() --- docs/unicode.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/unicode.md b/docs/unicode.md index db42b9d7..cbdb94df 100644 --- a/docs/unicode.md +++ b/docs/unicode.md @@ -10,6 +10,12 @@ Overrides the default NOCASE case-insensitive collation sequence to support UTF- Has no external dependencies (like libicu). Adapted from [sqlite3_unicode](https://github.com/Zensey/sqlite3_unicode) by Anton Litvinov. +⚠️ This extension cannot be loaded via `load_extension()` SQL function due to SQLite restrictions. Quoting the [docs](https://sqlite.org/lang_corefunc.html#load_extension): + +> The load_extension() function will fail if the extension attempts to modify or delete an SQL function or collating sequence. The extension can add new functions or collating sequences, but cannot modify or delete existing functions or collating sequences because those functions and/or collating sequences might be used elsewhere in the currently running SQL statement. To load an extension that changes or deletes functions or collating sequences, use the `sqlite3_load_extension()` C-language API. + +It works via SQLite CLI `.load` command, though. + ## Usage Before: