Fix tests on Postgres