On 8/14/08, Dennis Cote <[EMAIL PROTECTED]> wrote:
> Kodok Márton wrote:
>  >
>  >   I am working on a syncing project and I do have a lot of triggers to 
> read/write foreign keys.
>  >   And while I do the sync of one table the triggers are causing a strange 
> effect (as the other table is not yet synced).
>  >   Is there a pragma to disable triggers on the sqlite database?
>  >
>
>
> No, there is no way to disable triggers.
>
>  You could save the SQL used to create the triggers from the
>  sqlite_master table, drop the triggers, do the updates, and then finally
>  use the saved SQL to recreate the triggers after the updates.
>
>  HTH
>
> Dennis Cote
>


Interestingly, I have found need for such a mechanism as well... esp.
while updating a table but wishing not to update the TRIGGERed FTS
tables. Ended up following the approach suggested above, but would
have been nice to have something like

<UPDATE/DELETE/INSERT.... > WITHOUT TRIGGERS kinda mechanism. Or a

PRAGMA DISABLE_TRIGGERS
<UPDATE/DELETE/INSERT....>
PRAGMA ENABLE_TRIGGERS
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to