Fix PostgreSQL range tests

The changes in c4044b2 meant the tests would error on a fresh DB.