On Tue, Jul 3, 2012 at 10:55 AM, Jay A. Kreibich <j...@kreibi.ch> wrote: > On Tue, Jul 03, 2012 at 02:43:29PM +0200, Paul van Helden scratched on the > wall: > >> > The statement "UPDATE table SET column=NULL" updates every row in the >> > table. The fact that some rows may already have a NULL in that >> > column is not important. >> > >> > Well, it is important to me, the word "change" means before != after :-) > > You can argue about the naming of the _change() function all you > want. It is a non-standard extension and the function operates as > documented. If you want to call it poorly named, go ahead. That > doesn't change what it does. > > There is, however, little argument that the trigger is doing exactly > what one would expect. You are applying an update operation to every > row, and the trigger is firing for every row.
BTW, I think you can add to trigger "WHEN NEW.column IS NOT OLD.column" and it will fire only for rows where column value has really changed (beware "IS NOT" with arbitrary right side works only on SQLite 3.6.19 and above). Pavel _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users