Forum OpenACS Development: Response to Weird error invoking a plpgsql function (content_revision__delete)

I should have elaborated more in my previous post.  In your example, the foreign key constraint on ut_timespans also places referential integrity triggers on both the ut_time_intervals table and the ut_timespans table, so you'll get the data-change violation on either table if you change a row more than once inside of a transaction.  You can also get the error by any combination of inserts, updates or deletes.

I looked at the utplsql package when I first encountered it, and I noticed that it was released under an open-source licence, so it might be possible to port it to work with postgresql.  However that being said, I don't know that the effort would be worthwhile.  Most of test scripts that used the utplsql package were dead simple to convert.  If we wanted to develop a more elaborate regression test suite for openacs, then it might be worthwhile to port the utplsql package.

I'm not aware of regression test suites that work for postgresql, maybe someone else can jump in here and suggest one.