Added generic query() method to PostgreSQL data store.