4 ms·
Alphabetical makes it so two databases with the same triggers have the same behavior. FIFO breaks that, because now it depends on trigger construction order (eg
by setr 5y ago
Alphabetical makes it so two databases with the same triggers have the same behavior. FIFO breaks that, because now it depends on trigger construction order (eg when dump/restoring) and is totally invisible to the user.
Additionally, modifying a trigger by drop/creating it would change behavior, unless you also drop/create every trigger (in the original order)
- ipaddr 5y agoThank you most important thing I learned today.
- zaphirplane 5y agoWhat is an example where the order of execution is required, not contrived or bad practise. Looking for a good use case
- setr 5y agoEasiest I can imagine is a user-facing id that gets incremented by trigger (e.g. select max(col)+1 — autoincrement/serial doesn’t guarantee contiguity, or even reasonable increments…). And then any second trigger that relies on that value
- paulddraper 5y agoOh, I think it's probably bad practice to knowingly depend on that. But I also think that it's unnecessarily problematic to make the order non-deterministic.