Use func.lower instead of ilike for better compatibility.