Because you're forcing ILIKE when using the pgsql driver, you only need to cast to text and not lower. Lowering clobbers all indexes, making it impossible to improve query speeds. The below ILIKE when using pgsql takes care of lower and upper searches while still leaving the cast above for dates etc.
Because you're forcing ILIKE when using the pgsql driver, you only need to cast to text and not lower. Lowering clobbers all indexes, making it impossible to improve query speeds. The below ILIKE when using pgsql takes care of lower and upper searches while still leaving the cast above for dates etc.