Fix errors with postgres tests.