On Fri, Jan 02, 2009 at 11:38:38PM +0100, schachtobi scratched on the wall:
> Hello,
> 
> i have a question. In my application I issue an insert or replace
> operation. It seems that the delete trigger is not executed here.

  That's the documented behavior:
  http://www.sqlite.org/lang_conflict.html

    REPLACE
    When a UNIQUE constraint violation occurs, the pre-existing rows that
    are causing the constraint violation are removed prior to inserting
    or updating the current row. Thus the insert or update always occurs.
    The command continues executing normally. No error is returned. If a
    NOT NULL constraint violation occurs, the NULL value is replaced by
    the default value for that column. If the column has no default
    value, then the ABORT algorithm is used. If a CHECK constraint
    violation occurs then the IGNORE algorithm is used.

    When this conflict resolution strategy deletes rows in order to
    satisfy a constraint, it does not invoke delete triggers on those
    rows. This behavior might change in a future release.

> Is there a special replace trigger?

  Unfortunately, no.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Our opponent is an alien starship packed with atomic bombs.  We have
 a protractor."   "I'll go home and see if I can scrounge up a ruler
 and a piece of string."  --from Anathem by Neal Stephenson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to