Do we even nee this function? I thought psycopg2 took care of this internally.