Update tests to use a postgres DB

A real postgres DB connection must be available. Just make sure the appropriate
environment variables are set (e.g. PGHOST) and run 'go test'.