I need to increase the max depth of recursion triggers in SQLite.
I know I need to set the SQLITE_MAX_TRIGGER_DEPTH to the value I want, but I can’t find a way to do this.
I tried PRAGMA SQLITE_MAX_TRIGGER_DEPTH = X and it served no good.
Any idea on how to set this variable?
Thanks!
Quoting the SQLite documentation:
SQLite limits the depth of recursion of triggers in order to prevent a statement involving
recursive triggers from using an unbounded amount of memory.Prior to SQLite version 3.6.18, triggers were not recursive and so this limit was meaningless. Beginning with version 3.6.18, recursive triggers were supported but had to be explicitly enabled using the PRAGMA recursive_triggers statement. Beginning with version 3.7.0, recursive triggers are enabled by default but can be manually disabled using PRAGMA recursive_triggers. The SQLITE_MAX_TRIGGER_DEPTH is only meaningful if recursive triggers are enabled.
The default maximum trigger recursion depth is 1000.
The
PRAGMA recursive_triggersis only for enabling recursive triggers.The
SQLITE_MAX_TRIGGER_DEPTHparameter is a C preprocessor symbol that must be set when compiling SQLite itself; increasing it is not possible at runtime.