codahale/testdb — pull request #4 by metcalf (2014-12-09 02:41:09+00:00)
Title: Terminate connections before dropping the database in postgres.

Postgres will refuse to drop a database that has active connections. If you don't call `Close` in the right order in your tests, you can be left with hard-to-debug, lingering databases. We can instead force Postgres to terminate these open connections.

I'm not sure how I feel about this. On the one hand, we're primarily using this for Postgres and it's super helpful if it just does the right thing. OTOH, it's pretty annoying to embed more database specific logic in here -- conceivably we get to the point where we should just admit that this is a library we only use for PG.

What do you think @codahale?