As you roll back the database after the test results?
After the results of testing some functions I need to roll back the database to its original state prior to testing. The problem is that if the test function works with transactions, I can't wrap this test in its transaction. Because for example, postgres does not support nested transactions.
For example, I have a function that takes some value, selects other values, processes them and stores them somewhere. All I need is to check the stored values, and roll back the database. But nested transactions ruin everything.
Before each test, the database can operate to its original state, the only way. Remove nafig all tables and rolling all fixtures. Otherwise the test results will be mixed, to put it mildly - crap practice.