Fixed tests for postgresql