cast to varchar with ILIKE
cast to char for postgres and mysql compatibility
Revert "cast to char for postgres and mysql compatibility"

This reverts commit 3a7e63a94f93e5caf8b34025880fa2bc9813635c.
makes column sorting case insensitive in psql
Merge remote-tracking branch 'origin/cast-to-varchar-for-ilike-queries' into merchants_version
fix date sorting in PostgresSQL