Postgres test floc 1042

Fixes https://clusterhq.atlassian.net/browse/FLOC-1042

If this is suitable, I will add the new dependencies (currently just the latest https://pypi.python.org/pypi/psycopg2) to `setup.py`. Each dependency must also go in the internal documentation for packages used.

This uses `psycopg2` which requires, on OS X for example ``brew install postgresql``. Perhaps it would be better to use http://python.projects.pgfoundry.org, a pure Python implementation. If not, should this just document that you need to install PostgreSQL?.
I'm not sure why you're assembling SQL statements at all. Pre-written SQL would be less generic, but it's just a hardcoded test... and it would definitely be more readable.