SQLite PRAGMA

PRAGMA recursive_triggers

Query, set, or clear the recursive trigger capability.

PRAGMA recursive_triggers;
PRAGMA recursive_triggers = boolean;

On the sample database

What PRAGMA recursive_triggers returns on the sample database, in SQLite 3.54.1 as built for the browser by sql.js:

recursive_triggers
0

What the SQLite documentation says

Query, set, or clear the recursive trigger capability.

Changing the recursive_triggers setting affects the execution of all statements prepared using the database connection, including those prepared before the setting was changed. Any existing statements prepared using the legacy sqlite3_prepare() interface may fail with an SQLITE_SCHEMA error after the recursive_triggers setting is changed.

Prior to SQLite version 3.6.18 (2009-09-11), recursive triggers were not supported. The behavior of SQLite was always as if this pragma was set to OFF. Support for recursive triggers was added in version 3.6.18 but was initially turned OFF by default, for compatibility. Recursive triggers may be turned on by default in future versions of SQLite.

The depth of recursion for triggers has a hard upper limit set by the SQLITE_MAX_TRIGGER_DEPTH compile-time option and a run-time limit set by sqlite3_limit(db,SQLITE_LIMIT_TRIGGER_DEPTH,...).

From sqlite.org's pragma documentation for SQLite 3.54.1, in the public domain.

← read_uncommitted · reverse_unordered_selects →