by lostapathy · 8y ago · 0 comments
Most of our code ran through an ORM, and the ORM assumes the DB either did what it asked, or the query fails. I don't want to have to abandon my ORM because I can't trust my "DBA" to not sabotage my queries.
It should raise an exception, which indeed would cause the query to fail, and roll back the whole transaction (so no side effect is committed at all).
https://www.postgresql.org/docs/current/static/plpgsql-error...
The triggers that caused us problems generally came about to cover unrelated dba laziness and needed removed for sanity reasons anyway.
I am not arguing there cannot be a good case for triggers, just that when abused they cause a certain level of hell that is not worth it.