I have the following use case:
I have a set of different checks on different tables in one schema. If a data set is 'wrong' (did not pass a check) it gets pushed into another table in another schema. There one can edit the data again and, via an AFTER UPDATE
trigger, the data set will be pushed back to the original table. This will be successful when no check is violated.
Now I have the problem that I sometimes need to edit my check functions, because some data set might have been wrongfully pushed away from the table. But the data which still lay in the 'error' table will not get pushed back into the original table before I trigger an UPDATE
on it, even though it might be correct after my edition of the check function.
My question is: Is it possible to automatically trigger an UPDATE
on all data sets in such an 'error' table after editing the check functions of the original table (for instance based on the error message)?