Runs arbitrary SQL queries against a PostgreSQL database