|
|
|
|
|
by cryptonector
2420 days ago
|
|
> > and it can have function calls you don't know about because its body could dispatch just like triggers do. > Please give an example of a stored procedure that does something else than what the code says it will do. That's not what I wrote. I wrote that the caller of an SP need not know anything about the SP's body any more than the caller of a DML need not know anything about triggers. Of course that is true. And of course it's also true that the caller could know all those details in either case. |
|
It turns out our applications has triggers and by surprise the DELETE changed into
just because a few years ago someone thought that the logic of terminating a contract should be wrapped in a now long-forgotten trigger that magically transforms a straightforward DELETE into an UPDATE.If the developer had instead put the logic into a procedure like terminate_contract(customer_id), we wouldn't have had this problem in the first place.