ZF-8292: Zend_Test_PHPUnit_Db_Operation_Truncate fails on Postgres tables with foreign keys
If a Postgres database has tables with foreign keys, Zend_Test_PHPUnit_Db_Operation_Truncate fails with:
[SQLSTATE[0A000]: Feature not supported: 7 ERROR: cannot truncate a table referenced in a foreign key constraint DETAIL: Table "foo" references "bar". HINT: Truncate table "foo" at the same time, or use TRUNCATE ... CASCADE.]
The attached trivial patch fixes the problem on Postgres 8.3, but I don't know if it will work for older versions of Postgres. From what I can tell, the CASCADE parameter was added in 8.2. In 8.1, the documentation just says to TRUNCATE all the tables at once.