log warnings on psycopg2.DataError