Index: pages/lang_upsert.in ================================================================== --- pages/lang_upsert.in +++ pages/lang_upsert.in @@ -148,10 +148,15 @@ "DO UPDATE OR ABORT". If the DO UPDATE clause encounters any constraint violation, the entire INSERT statement rolls back and halts. This is true even if the DO UPDATE clause is contained within an INSERT statement or a trigger that specifies some other conflict resolution algorithm. + +

UPSERT is (currently) implemented internally as a transient trigger. +Therefore, in order for the UPDATE operation of an UPSERT to fire a trigger, +you must first enable recursive triggers using the +[PRAGMA recursive_triggers=ON;] statement.

History

UPSERT syntax was added to SQLite with version 3.24.0 ([dateof:3.24.0]). The original implementation closely followed the PostgreSQL syntax in that