triggers and functions behave like transactions?

Hello everyone! I have some actions that run some triggers/functions, for example:

  1. Delete a row from a table
  2. It fires a trigger pointing to a function
  3. That function inserts a row in another table
I was wondering if for some reason the (1) delete is completed succesfully, but the (3) inserts fails, Will I end with inconsistent data?, or it will roll back the delete action like if it was a transaction?

Thanks in advance guys!
Was this page helpful?