I am using the pg library to perform operations on a postgres database. The main function to perform a query is this (where pool is a variable containing authentication info):