Fix tests for postgresql