I have a function which connects to a postgres database and selects from a table but i dont want to use that data in the same function. What i want is to return the queryRes