Jeff Kowalczyk wrote:
Two projects that looked interesting: http://pgfoundry.org/projects/pgtap/ TAP-based unit tests for your database. pgTAP is a suite of database functions that make it easy to write unit tests in psql scripts suitable for harvesting, analysis, and reporting by a TAP harness, such as those used in Perl and PHP applications.
I know the author of this. It is a good project. I am not sure of the applicability though I would have to look deeper.
Joshua D. Drake