I have one question about the function flow in PostgreSQL. I used function to insert/update in table A and the function return integer value 1-> insert transaction, 0->update transaction. My question is if I add AFTER trigger in table A to update the new value to table B, when the return function will be delivered? First or second scenario?
First scenario: Call function -> update table A -> return function value -> call trigger -> update table B
Second scenario: Call function -> update table A -> call trigger -> update table B -> return function value?
Thanks in advance.