Long ago I noticed that the lang_createtrigger page says:

"An ON CONFLICT clause may be specified as part of an UPDATE or INSERT
action within the body of the trigger. However if an ON CONFLICT
clause is specified as part of the statement causing the trigger to
fire, then conflict handling policy of the outer statement is used
instead."

I've never quite understood quite what this means.  It's clear that an
INSERT OR ROLLBACK in a trigger, for example, should not rollback a
whole transaction if the top-level statement that triggered this
trigger had an "OR IGNORE" clause. Similarly for ABORT and FAIL.  But
surely an INSERT OR IGNORE in a trigger body cannot cause the
statement to fail just because the top-level statement is an INSERT OR
ROLLBACK statement, right?

Just in case I've been carefully avoiding the use of ON CONFLICT
clauses in my triggers.  But it'd be a nice short-cut if I could
reliably use OR IGNORE in my triggers.

Thanks in advance,

Nico
--
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to