Connecting to PostgreSQL database and making queries within Python ...