I'd like to be able to predict whether a DELETE
will run into a constraint violation, without actually performing the delete.
What are my options for doing this? Is there a simple way to do a "dry run" of a DELETE
?
We need to run a batch of several DELETE
s in separate transactions. If one fails, the others are already committed. (Bad design from the start, I know, but it's not my application, and it's not changing.) The best workaround at the moment sounds like doing a dry check to see if the DELETEs
will fail.
I'm trying to make sure they all succeed, or none of them succeed.