Unit tests

 * Fix Postgres tests in Jenkins. (Hopefully!)
 * Remove deprecated function test.