Re: [sqlite] Trigger firing order

2017-07-22 Thread Jean-Luc Hainaut
On 21/07/2017 19:00, Simon Slavin wrote: I’m minded to leave things as they are, with the order undefined. If you really want to trigger a number of different operations in a specific order, put those operations all in one trigger, one after another. Yes, possible now with the reminder of

Re: [sqlite] Trigger firing order

2017-07-22 Thread Jean-Luc Hainaut
On 21/07/2017 18:13, petern wrote: a programming pattern that is missing in SQLite trigger body: "if (new.C1 <> old.C1) then ". It can be simulated for updates ("update ... where ... and new.C1 <> old.C1") but not for inserts ("insert" has no "where" clause). Maybe so. But, INSERT can accept

Re: [sqlite] Trigger firing order

2017-07-21 Thread Simon Slavin
On 21 Jul 2017, at 5:52pm, Simon Slavin wrote: > On 21 Jul 2017, at 4:27pm, Jean-Luc Hainaut > wrote: > >> Hence my modest proposal: wouldn't it be a nice idea to make this unofficial >> order a feature of SQLite (just like DB2)? This would

Re: [sqlite] Trigger firing order

2017-07-21 Thread Simon Slavin
On 21 Jul 2017, at 4:27pm, Jean-Luc Hainaut wrote: > Hence my modest proposal: wouldn't it be a nice idea to make this unofficial > order a feature of SQLite (just like DB2)? This would make the multiple > triggers of a kind much more useful as it currently are.

Re: [sqlite] Trigger firing order

2017-07-21 Thread petern
> a programming pattern that is missing in SQLite trigger body: "if (new.C1 <> old.C1) then ". It can be simulated for updates ("update ... where ... and new.C1 <> old.C1") but not for inserts ("insert" has no "where" clause). Maybe so. But, INSERT can accept data rows from a SELECT statement