Fix tests for postgres